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

Nathan Reynolds updated HTTPCLIENT-1871:
----------------------------------------
    Description: 
DefaultHttpResponseParser.parseHead() can throw ProtocolException.  Please add 
more diagnostic information in the exception message.  For example, add the 
value of "i", "count" and why reject() returned true.  Please add the contents 
of this.lineBuf and any other information.

My program caught this exception and I am having a hard time to reproduce it.  
If I had more information in the exception message, then I would be able to 
have a better understanding of why the exception was thrown and how to 
reproduce the issue.

*Exception:*
org.apache.http.client.ClientProtocolException
        at 
org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:187)
        at 
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
   ...
Caused by: org.apache.http.ProtocolException: The server failed to respond with 
a valid HTTP response
        at 
org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:149)
        at 
org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56)
        at 
org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259)
        at 
org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163)
        at 
org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273)
        at 
org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
        at 
org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272)
        at 
org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
        at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
        at 
org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
        at 
org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
        ... 38 more


  was:
DefaultHttpResponseParser.parseHead() can throw ProtocolException.  Please add 
more diagnostic information in the exception message.  For example, add the 
value of "i", "count" and why reject() returned true.  Please add the contents 
of this.lineBuf and any other information.

My program caught this exception and I am having a hard time to reproduce it.  
If I had more information in the exception message, then I would be able to 
have a better understanding of why the exception was thrown and how to 
reproduce the issue.



> Add Diagnostic Information to ProtocolException Message
> -------------------------------------------------------
>
>                 Key: HTTPCLIENT-1871
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1871
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>    Affects Versions: 4.5.3
>            Reporter: Nathan Reynolds
>            Priority: Minor
>
> DefaultHttpResponseParser.parseHead() can throw ProtocolException.  Please 
> add more diagnostic information in the exception message.  For example, add 
> the value of "i", "count" and why reject() returned true.  Please add the 
> contents of this.lineBuf and any other information.
> My program caught this exception and I am having a hard time to reproduce it. 
>  If I had more information in the exception message, then I would be able to 
> have a better understanding of why the exception was thrown and how to 
> reproduce the issue.
> *Exception:*
> org.apache.http.client.ClientProtocolException
>       at 
> org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:187)
>       at 
> org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
>    ...
> Caused by: org.apache.http.ProtocolException: The server failed to respond 
> with a valid HTTP response
>       at 
> org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:149)
>       at 
> org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56)
>       at 
> org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259)
>       at 
> org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163)
>       at 
> org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273)
>       at 
> org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
>       at 
> org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272)
>       at 
> org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
>       at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
>       at 
> org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
>       at 
> org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
>       ... 38 more



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to