TestConnectionAutoRelease.java (httpcomponents-client-4.5.6-src) | : | TestConnectionAutoRelease.java (httpcomponents-client-4.5.7-src) | ||
---|---|---|---|---|
skipping to change at line 181 | skipping to change at line 181 | |||
@Override | @Override | |||
public void handle( | public void handle( | |||
final HttpRequest request, | final HttpRequest request, | |||
final HttpResponse response, | final HttpResponse response, | |||
final HttpContext context) throws HttpException, IOException { | final HttpContext context) throws HttpException, IOException { | |||
final BasicHttpEntity entity = new BasicHttpEntity() { | final BasicHttpEntity entity = new BasicHttpEntity() { | |||
@Override | @Override | |||
public void writeTo( | public void writeTo( | |||
final OutputStream outstream) throws IOException { | final OutputStream outStream) throws IOException { | |||
final byte[] tmp = new byte[5]; | final byte[] tmp = new byte[5]; | |||
outstream.write(tmp); | outStream.write(tmp); | |||
outstream.flush(); | outStream.flush(); | |||
// do something comletely ugly in order to trigger | // do something comletely ugly in order to trigger | |||
// MalformedChunkCodingException | // MalformedChunkCodingException | |||
final DefaultBHttpServerConnection conn = (DefaultBHttpS erverConnection) | final DefaultBHttpServerConnection conn = (DefaultBHttpS erverConnection) | |||
context.getAttribute(HttpCoreContext.HTTP_CONNEC TION); | context.getAttribute(HttpCoreContext.HTTP_CONNEC TION); | |||
try { | try { | |||
conn.sendResponseHeader(response); | conn.sendResponseHeader(response); | |||
} catch (final HttpException ignore) { | } catch (final HttpException ignore) { | |||
} | } | |||
} | } | |||
End of changes. 2 change blocks. | ||||
3 lines changed or deleted | 3 lines changed or added |