hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Vaskevych <ivan.vaskev...@gmail.com>
Subject HTTP specification problem: DefaultResponseParser
Date Sat, 21 Apr 2012 14:00:46 GMT
Hi folks,


httpclient: 4.1.3
httpcore: 4.1.4

I get a response from the http server with empty status, and get the
ProtocolException from HC. The stack trace is below.
The site is https. Browsers (IE, Firefox) open the page successfully.
Checked with Fiddler, no status in the first line indeed, just "HTTP/1.1",
then goes LF-CR and "Date:...."

The research shows that omitted status code in the response from the server
means it's 200 OK (http://www.ietf.org/rfc/rfc3875, p.23).
Can you please check this?

Thanks.


STACK TRACE:

Caused by: org.apache.http.ProtocolException: Status line contains invalid
status code: HTTP/1.1
    at
org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:254)
    at
org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:282)
    at
org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:247)
    at
org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:216)
    at
org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:298)
    at
org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
    at
org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:647)
    at
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:464)
    at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
    ... 11 more
Caused by: org.apache.http.ParseException: Status line contains invalid
status code: HTTP/1.1
    at
org.apache.http.message.BasicLineParser.parseStatusLine(BasicLineParser.java:422)
    at
org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:118)
    at
org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:252)
    ... 19 more


-- 
Best Regards,
 Ivan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message