hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HTTPCLIENT-847) Handling of a buggy response to HEAD request
Date Tue, 05 May 2009 11:43:30 GMT

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Oleg Kalnichevski resolved HTTPCLIENT-847.

    Resolution: Won't Fix


I am afraid I do not have any good news for. It is just not possible to work this issue around
for non-compliant HTTP servers without breaking compatibility with compliant ones. 

However, you can always override the default behavior of HttpClient for a particular application
specific context:

(1) subclass HttpRequestExecutor
(2) override HttpRequestExecutor#doReceiveResponse method
(3) provide custom logic for HEAD responses either originating from servers that are known
to be broken or based on the 'Server' response header or some other settings
(4) subclass DefaultHttpClient
(5) override DefaultHttpClient#createRequestExecutor method and replace the default implementation
with the custom one.

Hope this helps


> Handling of a buggy response to HEAD request
> --------------------------------------------
>                 Key: HTTPCLIENT-847
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-847
>             Project: HttpComponents HttpClient
>          Issue Type: Question
>    Affects Versions: 4.0 Beta 2
>         Environment: Java 1.5.0_14
>            Reporter: Johannes Koch
>            Priority: Minor
>         Attachments: TestHeadRequestWithBuggyServer.java
> I tried to make a HEAD request to some server and discovered, that the server seems to
respond in some buggy way. The response is a 302 and contains an entity.
> This makes HttpClient waiting and wainting and ... when redirecting is true.
> What would be the preferred way to make HttpClient stop processing the response in this

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message