@@ -813,56 +813,67 @@ class Message {
813813 client .header ("Accept" , "application/json" );
814814 client .get ("/defaults" , rsp -> {
815815 assertEquals ("{OK}" , rsp .body ().string ());
816+ assertEquals ("text/plain" , rsp .header ("Content-Type" ).toLowerCase ());
816817 });
817818
818819 client .header ("Accept" , "application/xml" );
819820 client .get ("/defaults" , rsp -> {
820821 assertEquals ("<OK>" , rsp .body ().string ());
822+ assertEquals ("text/plain" , rsp .header ("Content-Type" ).toLowerCase ());
821823 });
822824
823825 client .header ("Accept" , "text/plain" );
824826 client .get ("/defaults" , rsp -> {
825827 assertEquals ("OK" , rsp .body ().string ());
828+ assertEquals ("text/plain" , rsp .header ("Content-Type" ).toLowerCase ());
826829 });
827830
828831 client .header ("Accept" , "*/*" );
829832 client .get ("/defaults" , rsp -> {
830833 assertEquals ("{OK}" , rsp .body ().string ());
834+ assertEquals ("text/plain" , rsp .header ("Content-Type" ).toLowerCase ());
831835 });
832836
833837 client .header ("Accept" , "text/html" );
834838 client .get ("/defaults" , rsp -> {
835839 assertEquals (406 , rsp .code ());
840+ assertEquals ("text/html;charset=utf-8" , rsp .header ("Content-Type" ).toLowerCase ());
836841 });
837842
838843 client .header ("Accept" , "text/html" );
839844 client .get ("/defaults?type=text/html" , rsp -> {
840845 assertEquals ("OK" , rsp .body ().string ());
846+ assertEquals ("text/html" , rsp .header ("Content-Type" ).toLowerCase ());
841847 });
842848
843849 client .header ("Accept" , "application/json" );
844850 client .get ("/produces" , rsp -> {
845851 assertEquals ("{OK}" , rsp .body ().string ());
852+ assertEquals ("application/json;charset=utf-8" , rsp .header ("Content-Type" ).toLowerCase ());
846853 });
847854
848855 client .header ("Accept" , "application/xml" );
849856 client .get ("/produces" , rsp -> {
850857 assertEquals ("<OK>" , rsp .body ().string ());
858+ assertEquals ("application/xml;charset=utf-8" , rsp .header ("Content-Type" ).toLowerCase ());
851859 });
852860
853861 client .header ("Accept" , "*/*" );
854862 client .get ("/produces" , rsp -> {
855863 assertEquals ("{OK}" , rsp .body ().string ());
864+ assertEquals ("application/json;charset=utf-8" , rsp .header ("Content-Type" ).toLowerCase ());
856865 });
857866
858867 client .header ("Accept" , "text/html" );
859868 client .get ("/produces" , rsp -> {
860869 assertEquals (406 , rsp .code ());
870+ assertEquals ("text/html;charset=utf-8" , rsp .header ("Content-Type" ).toLowerCase ());
861871 });
862872
863873 client .header ("Accept" , "text/plain" );
864874 client .get ("/produces" , rsp -> {
865875 assertEquals (406 , rsp .code ());
876+ assertEquals ("text/plain;charset=utf-8" , rsp .header ("Content-Type" ).toLowerCase ());
866877 });
867878 });
868879 }
0 commit comments