Skip to content

Commit

Permalink
Remove old test case from HttpConnectionTest (#12472)
Browse files Browse the repository at this point in the history
  • Loading branch information
janbartel authored Nov 6, 2024
1 parent c64667c commit a5020e9
Showing 1 changed file with 0 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
import org.hamcrest.Matchers;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
Expand Down Expand Up @@ -865,27 +864,6 @@ public void testBadURIencoding() throws Exception
checkContains(response, 0, "HTTP/1.1 400");
}

@Test
@Disabled("review this test. seems a security issue to fallback from utf-8 to iso-1, was there a reason to do that?")
public void testBadUTF8FallsbackTo8859() throws Exception
{
_server.start();
LOG.info("badMessage: bad encoding expected ...");
String response;

response = _connector.getResponse("GET /foo/bar%c0%00 HTTP/1.1\r\n" +
"Host: localhost\r\n" +
"Connection: close\r\n" +
"\r\n");
checkContains(response, 0, "HTTP/1.1 400");

response = _connector.getResponse("GET /bad/utf8%c1 HTTP/1.1\r\n" +
"Host: localhost\r\n" +
"Connection: close\r\n" +
"\r\n");
checkContains(response, 0, "HTTP/1.1 200"); //now fallback to iso-8859-1
}

@Test
public void testAutoFlush() throws Exception
{
Expand Down

0 comments on commit a5020e9

Please sign in to comment.