You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Oleg Kalnichevski <o....@dplanet.ch> on 2003/04/27 23:00:39 UTC
Re: DO NOT REPLY [Bug 19226] - NTLM authentication failed due to
closing of connection
On Sun, 2003-04-27 at 22:55, Michael Becke wrote:
> The proxy seems to be sending a "Proxy-Connection: close" on the first
> try as well, even though you are using HTTP 1.1.
>
That's perfectly all right as the connection is supposed to be closed
due to the failed authentication. This is a spec compliant behavior as
far as I can tell
Oleg
Re: DO NOT REPLY [Bug 19226] - NTLM authentication failed due to
closing of connection
Posted by Oleg Kalnichevski <o....@dplanet.ch>.
On Sun, 2003-04-27 at 23:45, Michael Becke wrote:
> Are you saying that if credentials were present on the first pass then
> "Proxy-Connection: close" would not be sent?
>
Exactly. It's just a guess, though. It remains to be seen if my
assumptions holds true to reality.
Oleg
Re: DO NOT REPLY [Bug 19226] - NTLM authentication failed due to closing of connection
Posted by Adrian Sutton <ad...@intencha.com>.
Squid does not send Proxy-Connection close if HttpClient sends a
Proxy-Connection: keep-alive header, Squid doesn't seem to have any
real knowledge of how NTLM works except that it talks to some
authentication component and gets a header that needs to be added.
Note that when keep-alive is not sent by HttpClient Squid closes the
connection regardless of the content of any other header (ie: even if
the NTLM authentication attempt is present).
The simplest solution that I can see (and it seems like a really good
idea), is that HttpClient adds a Proxy-Connection: keep-alive header
whenever it attempts NTLM authentication (Connection: keep-alive as
well when authenticating with a server). That would be then provide a
request from HttpClient to keep the connection alive which the server
may still choose to reject, but we'd have done all we can to tell it
about the particular requirements of NTLM.
Regards,
Adrian Sutton.
On Monday, April 28, 2003, at 07:45 AM, Michael Becke wrote:
> Are you saying that if credentials were present on the first pass then
> "Proxy-Connection: close" would not be sent?
>
> My assumption with NTLM has been that it requires multiple passes to
> be fully authenticated. So I was thinking that the "while
> (forwardCount++ < MAX_FORWARDS)" loop in execute() would get run a few
> times. If this is correct then responseStream.close() will get called
> each time at the bottom of the loop. This will have the effect of
> closing the connection if "keep-alive" is not set.
>
> Mike
Re: DO NOT REPLY [Bug 19226] - NTLM authentication failed due to closing of connection
Posted by Michael Becke <be...@u.washington.edu>.
Are you saying that if credentials were present on the first pass then
"Proxy-Connection: close" would not be sent?
My assumption with NTLM has been that it requires multiple passes to be
fully authenticated. So I was thinking that the "while (forwardCount++
< MAX_FORWARDS)" loop in execute() would get run a few times. If this
is correct then responseStream.close() will get called each time at the
bottom of the loop. This will have the effect of closing the
connection if "keep-alive" is not set.
Mike
On Sunday, April 27, 2003, at 05:33 PM, Oleg Kalnichevski wrote:
> That's clear. My assumption is that if HTTP version were 1.1 and NTLM
> credentials were present the server would know that NTLM authentication
> handshake were underway and the connection would not be closed. I still
> have to test this assumption, though.
>
> Oleg
>
> On Sun, 2003-04-27 at 23:22, Michael Becke wrote:
>> The problem is that the connection will be closed by
>> responseBodyConsumed() because shouldCloseConnection() will be true.
>>
>> Mike
>>
>> On Sunday, April 27, 2003, at 05:00 PM, Oleg Kalnichevski wrote:
>>
>>> On Sun, 2003-04-27 at 22:55, Michael Becke wrote:
>>>> The proxy seems to be sending a "Proxy-Connection: close" on the
>>>> first
>>>> try as well, even though you are using HTTP 1.1.
>>>>
>>>
>>> That's perfectly all right as the connection is supposed to be closed
>>> due to the failed authentication. This is a spec compliant behavior
>>> as
>>> far as I can tell
>>>
>>> Oleg
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail:
>>> commons-httpclient-dev-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail:
>>> commons-httpclient-dev-help@jakarta.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> commons-httpclient-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail:
>> commons-httpclient-dev-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> commons-httpclient-dev-help@jakarta.apache.org
>
Re: DO NOT REPLY [Bug 19226] - NTLM authentication failed due to
closing of connection
Posted by Oleg Kalnichevski <o....@dplanet.ch>.
That's clear. My assumption is that if HTTP version were 1.1 and NTLM
credentials were present the server would know that NTLM authentication
handshake were underway and the connection would not be closed. I still
have to test this assumption, though.
Oleg
On Sun, 2003-04-27 at 23:22, Michael Becke wrote:
> The problem is that the connection will be closed by
> responseBodyConsumed() because shouldCloseConnection() will be true.
>
> Mike
>
> On Sunday, April 27, 2003, at 05:00 PM, Oleg Kalnichevski wrote:
>
> > On Sun, 2003-04-27 at 22:55, Michael Becke wrote:
> >> The proxy seems to be sending a "Proxy-Connection: close" on the first
> >> try as well, even though you are using HTTP 1.1.
> >>
> >
> > That's perfectly all right as the connection is supposed to be closed
> > due to the failed authentication. This is a spec compliant behavior as
> > far as I can tell
> >
> > Oleg
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > commons-httpclient-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > commons-httpclient-dev-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org
>
Re: DO NOT REPLY [Bug 19226] - NTLM authentication failed due to closing of connection
Posted by Michael Becke <be...@u.washington.edu>.
The problem is that the connection will be closed by
responseBodyConsumed() because shouldCloseConnection() will be true.
Mike
On Sunday, April 27, 2003, at 05:00 PM, Oleg Kalnichevski wrote:
> On Sun, 2003-04-27 at 22:55, Michael Becke wrote:
>> The proxy seems to be sending a "Proxy-Connection: close" on the first
>> try as well, even though you are using HTTP 1.1.
>>
>
> That's perfectly all right as the connection is supposed to be closed
> due to the failed authentication. This is a spec compliant behavior as
> far as I can tell
>
> Oleg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> commons-httpclient-dev-help@jakarta.apache.org
>