org.apache.http.client.ClientProtocolException
        at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:822)
        at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
        at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732)
...
Caused by: org.apache.http.ProtocolException: The server failed to
respond with a valid HTTP response
        at 
org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:109)
        at 
org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:252)
        at 
org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:281)
        at 
org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:247)
        at 
org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:219)
        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:645)
        at 
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:464)
        at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
        ... 16 more

2012/9/13 Jean-Marc Spaggiari <[email protected]>:
> Can you past the complete exception here? Is there any causes in the 
> exception?
>
> 2012/9/13, Oliver Zemann <[email protected]>:
>> Hi,
>>
>> when i try to HttpGet the following URL http://ocsp.a-trust.at/ocsp
>> (which i can access in FF and get OK 200 with size -1 (no idea why)
>> its working as expexted) i get an
>> org.apache.http.ProtocolException: The server failed to respond with a
>> valid HTTP response
>>
>> Can someone tell me whats wrong?
>>
>> String uri = "http://ocsp.a-trust.at/ocsp";;
>> HttpGet httpGet = new HttpGet(uri);
>> HttpResponse response = httpClient.execute(httpGet); -- here it will
>> throw the exception
>>
>>
>> HttpClient 4.2.1 and HttpCore 4.2.1
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

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

Reply via email to