"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpclient/src/test/java/org/apache/http/impl/client/integration/TestMalformedServerResponse.java" between
httpcomponents-client-4.5.6-src.tar.gz and httpcomponents-client-4.5.7-src.tar.gz

About: HttpComponents is an Apache project responsible for creating and maintaining a toolset of low level Java components focused on HTTP and associated protocols. Java sources.

TestMalformedServerResponse.java  (httpcomponents-client-4.5.6-src):TestMalformedServerResponse.java  (httpcomponents-client-4.5.7-src)
skipping to change at line 53 skipping to change at line 53
import org.apache.http.protocol.HttpContext; import org.apache.http.protocol.HttpContext;
import org.apache.http.protocol.HttpRequestHandler; import org.apache.http.protocol.HttpRequestHandler;
import org.apache.http.util.EntityUtils; import org.apache.http.util.EntityUtils;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
public class TestMalformedServerResponse extends LocalServerTestBase { public class TestMalformedServerResponse extends LocalServerTestBase {
static class BrokenServerConnection extends DefaultBHttpServerConnection { static class BrokenServerConnection extends DefaultBHttpServerConnection {
public BrokenServerConnection(final int buffersize) { public BrokenServerConnection(final int bufferSize) {
super(buffersize); super(bufferSize);
} }
@Override @Override
public void sendResponseHeader(final HttpResponse response) throws HttpE xception, IOException { public void sendResponseHeader(final HttpResponse response) throws HttpE xception, IOException {
super.sendResponseHeader(response); super.sendResponseHeader(response);
if (response.getStatusLine().getStatusCode() == HttpStatus.SC_NO_CON TENT) { if (response.getStatusLine().getStatusCode() == HttpStatus.SC_NO_CON TENT) {
response.setEntity(new StringEntity( response.setEntity(new StringEntity(
"garbage\ngarbage\n" + "garbage\ngarbage\n" +
"garbage\ngarbage\n" + "garbage\ngarbage\n" +
"garbage\ngarbage\n" + "garbage\ngarbage\n" +
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)