You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Chris Ashurst <ca...@thig.com> on 2005/09/09 17:41:21 UTC

Protocol Settings

This is more of an inquiry rather than a "I'm Stuck! WTF is going on!?" 
email...

I'm arguing back and forth with someone at the company that provides us 
with a web service that we plan to use.

At this point in time, I have managed to authenticate with their service 
under SSL and Basic authentication. I know this because before I was 
getting 401 errors, and now I'm just getting 500 errors, but I digress.

Anyway, her current claim is that their servers do not support HTTP/1.0 
protocol, to which I say fine, and I set the default protocol for 
httpclient to use as HttpVersion.HTTP_1_1. So now everything I send to 
them is using protocol version 1.1. According to my debug output, 
httpclient uses 1.1 normally, but I see further down the log that it 
sets it according to what I specified (ie: 1.1 again).

Now, I suppose what I really need is the Voice Of Experience to back me 
up on this, but she claims that I must still be sending in 1.0, but in 
the logs, it's clear as day that I'm not. She also claims the following:

"I also noticed HTTP 1.1 100 Continue in the debug file. That has
problems in 1.0 too."

To which I have pointed out in the debug log that:

~~~
[DEBUG] DefaultHttpParams - Set parameter http.protocol.version = HTTP/1.1
...
[DEBUG] header - << "HTTP/1.1 100 Continue[\r][\n]"
[DEBUG] header - << "Server: Microsoft-IIS/5.0[\r][\n]"
[DEBUG] header - << "Date: Fri, 09 Sep 2005 13:42:57 GMT[\r][\n]"
[DEBUG] header - << "X-Powered-By: ASP.NET[\r][\n]"
[INFO] HttpMethodBase - Discarding unexpected response: HTTP/1.1 100 
Continue
~~~

The last INFO line is saying that httpclient is basically ignoring the 
100 Continue (the above log output happens after I have sent the 
requestbody).

So yeah. Sorry to be long-winded, but am I making some sort of huge 
mistake? Or is she just not being too bright? Once I or she has been 
vindicated, then at least I can move on and figure out why the bloody 
SOAP envelope is not working...

Thanks for listening!


~Chris


-- 
~Chris Ashurst
~~Tower Hill Insurance
~cashurst@thig.com

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Re: Protocol Settings

Posted by Michael Becke <mb...@gmail.com>.
Hi Chris,

It's hard to tell without more detail, but it does sound like an error
on the server side.  Just for kicks you may want to enable Expect
support on the client side
<http://jakarta.apache.org/commons/httpclient/preference-api.html>. 
This will include Expect in the request headers and may help, hard to
say.

If you search though the mailing list archives I believe you are not
the first person to encounter issues with IIS5 and unwanted Expect
headers.

Mike

On 9/9/05, Chris Ashurst <ca...@thig.com> wrote:
> This is more of an inquiry rather than a "I'm Stuck! WTF is going on!?"
> email...
> 
> I'm arguing back and forth with someone at the company that provides us
> with a web service that we plan to use.
> 
> At this point in time, I have managed to authenticate with their service
> under SSL and Basic authentication. I know this because before I was
> getting 401 errors, and now I'm just getting 500 errors, but I digress.
> 
> Anyway, her current claim is that their servers do not support HTTP/1.0
> protocol, to which I say fine, and I set the default protocol for
> httpclient to use as HttpVersion.HTTP_1_1. So now everything I send to
> them is using protocol version 1.1. According to my debug output,
> httpclient uses 1.1 normally, but I see further down the log that it
> sets it according to what I specified (ie: 1.1 again).
> 
> Now, I suppose what I really need is the Voice Of Experience to back me
> up on this, but she claims that I must still be sending in 1.0, but in
> the logs, it's clear as day that I'm not. She also claims the following:
> 
> "I also noticed HTTP 1.1 100 Continue in the debug file. That has
> problems in 1.0 too."
> 
> To which I have pointed out in the debug log that:
> 
> ~~~
> [DEBUG] DefaultHttpParams - Set parameter http.protocol.version = HTTP/1.1
> ...
> [DEBUG] header - << "HTTP/1.1 100 Continue[\r][\n]"
> [DEBUG] header - << "Server: Microsoft-IIS/5.0[\r][\n]"
> [DEBUG] header - << "Date: Fri, 09 Sep 2005 13:42:57 GMT[\r][\n]"
> [DEBUG] header - << "X-Powered-By: ASP.NET[\r][\n]"
> [INFO] HttpMethodBase - Discarding unexpected response: HTTP/1.1 100
> Continue
> ~~~
> 
> The last INFO line is saying that httpclient is basically ignoring the
> 100 Continue (the above log output happens after I have sent the
> requestbody).
> 
> So yeah. Sorry to be long-winded, but am I making some sort of huge
> mistake? Or is she just not being too bright? Once I or she has been
> vindicated, then at least I can move on and figure out why the bloody
> SOAP envelope is not working...
> 
> Thanks for listening!
> 
> 
> ~Chris
> 
> 
> --
> ~Chris Ashurst
> ~~Tower Hill Insurance
> ~cashurst@thig.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org