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 Johan Karlberg <jo...@ifsworld.com> on 2006/05/18 10:28:38 UTC

411 Length Required error message while authenticating with IIS/5 .0 and Exchange 2000

Greetings,

While testing an Exchange integration using HTTPClient 2.0.2m which worked
fine, we decided to see how 3.01 fared. Unfortunatley, this turned out to
produce problems in the authentication, both with 2.0 and 3.0-style
authentication, and for both NTLM and Basic authentiction methods.
Authentication is non-preemptive in both cases, and I'm attaching the log of
the HTTP conversation in question.

The server is IIS 5, as used by the Exchange 2000 webstore, running on a
Windows 2000 server, and the application is authenticating while performing
a SEARCH using the current slide webdav client library.

Is this correct behaviour from HTTPClient, and more to the point, is it
intended behaviour?

I can provide additional detail or testing if needed to determine the cause
or intent.

2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: >> "SEARCH /exchange/exgsm/Tasks HTTP/1.1[\r][\n]"
2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: >> "Content-Type: text/xml; charset=utf-8[\r][\n]"
2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: >> "User-Agent: Jakarta Commons-HttpClient/3.0.1[\r][\n]"
2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: >> "Host: GBGV-VM-S001[\r][\n]"
2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: >> "[\r][\n]"
2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: << "HTTP/1.1 401 Access Denied[\r][\n]"
2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: << "Server: Microsoft-IIS/5.0[\r][\n]"
2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: << "Date: Thu, 18 May 2006 07:54:11 GMT[\r][\n]"
2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: << "WWW-Authenticate: Negotiate[\r][\n]"
2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: << "WWW-Authenticate: NTLM[\r][\n]"
2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: << "WWW-Authenticate: Basic realm="GBGV-VM-S001"[\r][\n]"
2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: << "Connection: close[\r][\n]"
2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: << "Content-Length: 24[\r][\n]"
2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: << "Content-Type: text/html[\r][\n]"
2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: << "Error: Access is Denied."
2006-maj-18 09:54:09
org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: ntlm authentication scheme selected
2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: >> "SEARCH /exchange/exgsm/Tasks HTTP/1.1[\r][\n]"
2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: >> "Content-Type: text/xml; charset=utf-8[\r][\n]"
2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: >> "User-Agent: Jakarta Commons-HttpClient/3.0.1[\r][\n]"
2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: >> "Authorization: NTLM
TlRMTVNTUAABAAAABlIAAAAAAAAsAAAADAAMACAAAABHQkdWLVZNLVMwMDE=[\r][\n]"
2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: >> "Host: GBGV-VM-S001[\r][\n]"
2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: >> "[\r][\n]"
2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: << "HTTP/1.1 401 Access Denied[\r][\n]"
2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: << "Server: Microsoft-IIS/5.0[\r][\n]"
2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: << "Date: Thu, 18 May 2006 07:54:11 GMT[\r][\n]"
2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: << "WWW-Authenticate: NTLM
TlRMTVNTUAACAAAABwAHADgAAAAGAoEC2EdiwYB0KIoAAAAAAAAAAIAAgAA/AAAABQCTCAAAAA9H
QkdWLVZNAgAOAEcAQgBHAFYALQBWAE0AAQAYAEcAQgBHAFYALQBWAE0ALQBTADAAMAAxAAQAFgBH
AEIARwBWAC0AVgBNAC4AQwBPAE0AAwAwAGcAYgBnAHYALQB2AG0ALQBzADAAMAAxAC4ARwBCAEcA
VgAtAFYATQAuAEMATwBNAAAAAAA=[\r][\n]"
2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: << "Content-Length: 24[\r][\n]"
2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: << "Content-Type: text/html[\r][\n]"
2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
FIN: << "Error: Access is Denied."
2006-maj-18 09:54:11 org.apache.commons.httpclient.Wire wire
FIN: >> "SEARCH /exchange/exgsm/Tasks HTTP/1.1[\r][\n]"
2006-maj-18 09:54:11 org.apache.commons.httpclient.Wire wire
FIN: >> "Content-Type: text/xml; charset=utf-8[\r][\n]"
2006-maj-18 09:54:11 org.apache.commons.httpclient.Wire wire
FIN: >> "User-Agent: Jakarta Commons-HttpClient/3.0.1[\r][\n]"
2006-maj-18 09:54:11 org.apache.commons.httpclient.Wire wire
FIN: >> "Authorization: NTLM
TlRMTVNTUAADAAAAGAAYAFEAAAAAAAAAaQAAAAAAAABAAAAABQAFAEAAAAAMAAwARQAAAAAAAABp
AAAABlIAAEVYR1NNR0JHVi1WTS1TMDAx6GwFxORp+QBWp6H66SNHv73L5BrOICog[\r][\n]"
2006-maj-18 09:54:11 org.apache.commons.httpclient.Wire wire
FIN: >> "Host: GBGV-VM-S001[\r][\n]"
2006-maj-18 09:54:11 org.apache.commons.httpclient.Wire wire
FIN: >> "[\r][\n]"
2006-maj-18 09:54:11 org.apache.commons.httpclient.Wire wire
FIN: << "HTTP/1.1 411 Length Required[\r][\n]"
2006-maj-18 09:54:11 org.apache.commons.httpclient.Wire wire
FIN: << "Server: Microsoft-IIS/5.0[\r][\n]"
2006-maj-18 09:54:11 org.apache.commons.httpclient.Wire wire
FIN: << "Date: Thu, 18 May 2006 07:54:12 GMT[\r][\n]"
2006-maj-18 09:54:11 org.apache.commons.httpclient.Wire wire
FIN: << "Connection: close[\r][\n]"
2006-maj-18 09:54:11 org.apache.commons.httpclient.Wire wire
FIN: << "Content-Type: text/html[\r][\n]"
2006-maj-18 09:54:11 org.apache.commons.httpclient.Wire wire
FIN: << "Content-Length: 147[\r][\n]"
2006-maj-18 09:54:11 org.apache.commons.httpclient.Wire wire
FIN: << "<HTML>[\r]<HEAD>[\r]<META HTTP-EQUIV="Content-Type"
CONTENT="text/html; charset=utf-8">[\r]</HEAD>[\r]<body><h2>HTTP/1.1 411
Length Required</h2></body></HTML>"

Thanks in advance, 

Johan Karlberg
------------------------------------------------------------------------------

CONFIDENTIALITY AND DISCLAIMER NOTICE

This e-mail, including any attachments, is confidential and intended only for
the addressee. If you are not the intended recipient, please notify us
immediately and delete this e-mail from your system. Any use or disclosure of
the information contained herein is strictly prohibited.


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


Re: 411 Length Required error message while authenticating with IIS/5 .0 and Exchange 2000

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Thu, 2006-05-18 at 10:28 +0200, Johan Karlberg wrote:
> Greetings,
> 
> While testing an Exchange integration using HTTPClient 2.0.2m which worked
> fine, we decided to see how 3.01 fared. Unfortunatley, this turned out to
> produce problems in the authentication, both with 2.0 and 3.0-style
> authentication, and for both NTLM and Basic authentiction methods.
> Authentication is non-preemptive in both cases, and I'm attaching the log of
> the HTTP conversation in question.
> 
> The server is IIS 5, as used by the Exchange 2000 webstore, running on a
> Windows 2000 server, and the application is authenticating while performing
> a SEARCH using the current slide webdav client library.
> 
> Is this correct behaviour from HTTPClient, and more to the point, is it
> intended behaviour?
> 

Johan,

As far as I can tell the NTLM authentication was in fact successful. No
problem there. The request was rejected because the target server
expected the SEARCH request to provide some content and a content-length
header, which was missing in the request. 

This appears to be a problem caused by the Slide library you are using.
As far as I know stable releases of Slide are incompatible with
HttpClient 3.0. Anyways, you should seek assistance at the Slide user
list.

Oleg


> I can provide additional detail or testing if needed to determine the cause
> or intent.
> 
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: >> "SEARCH /exchange/exgsm/Tasks HTTP/1.1[\r][\n]"
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: >> "Content-Type: text/xml; charset=utf-8[\r][\n]"
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: >> "User-Agent: Jakarta Commons-HttpClient/3.0.1[\r][\n]"
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: >> "Host: GBGV-VM-S001[\r][\n]"
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: >> "[\r][\n]"
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: << "HTTP/1.1 401 Access Denied[\r][\n]"
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: << "Server: Microsoft-IIS/5.0[\r][\n]"
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: << "Date: Thu, 18 May 2006 07:54:11 GMT[\r][\n]"
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: << "WWW-Authenticate: Negotiate[\r][\n]"
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: << "WWW-Authenticate: NTLM[\r][\n]"
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: << "WWW-Authenticate: Basic realm="GBGV-VM-S001"[\r][\n]"
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: << "Connection: close[\r][\n]"
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: << "Content-Length: 24[\r][\n]"
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: << "Content-Type: text/html[\r][\n]"
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: << "Error: Access is Denied."
> 2006-maj-18 09:54:09
> org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
> INFO: ntlm authentication scheme selected
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: >> "SEARCH /exchange/exgsm/Tasks HTTP/1.1[\r][\n]"
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: >> "Content-Type: text/xml; charset=utf-8[\r][\n]"
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: >> "User-Agent: Jakarta Commons-HttpClient/3.0.1[\r][\n]"
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: >> "Authorization: NTLM
> TlRMTVNTUAABAAAABlIAAAAAAAAsAAAADAAMACAAAABHQkdWLVZNLVMwMDE=[\r][\n]"
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: >> "Host: GBGV-VM-S001[\r][\n]"
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: >> "[\r][\n]"
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: << "HTTP/1.1 401 Access Denied[\r][\n]"
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: << "Server: Microsoft-IIS/5.0[\r][\n]"
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: << "Date: Thu, 18 May 2006 07:54:11 GMT[\r][\n]"
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: << "WWW-Authenticate: NTLM
> TlRMTVNTUAACAAAABwAHADgAAAAGAoEC2EdiwYB0KIoAAAAAAAAAAIAAgAA/AAAABQCTCAAAAA9H
> QkdWLVZNAgAOAEcAQgBHAFYALQBWAE0AAQAYAEcAQgBHAFYALQBWAE0ALQBTADAAMAAxAAQAFgBH
> AEIARwBWAC0AVgBNAC4AQwBPAE0AAwAwAGcAYgBnAHYALQB2AG0ALQBzADAAMAAxAC4ARwBCAEcA
> VgAtAFYATQAuAEMATwBNAAAAAAA=[\r][\n]"
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: << "Content-Length: 24[\r][\n]"
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: << "Content-Type: text/html[\r][\n]"
> 2006-maj-18 09:54:09 org.apache.commons.httpclient.Wire wire
> FIN: << "Error: Access is Denied."
> 2006-maj-18 09:54:11 org.apache.commons.httpclient.Wire wire
> FIN: >> "SEARCH /exchange/exgsm/Tasks HTTP/1.1[\r][\n]"
> 2006-maj-18 09:54:11 org.apache.commons.httpclient.Wire wire
> FIN: >> "Content-Type: text/xml; charset=utf-8[\r][\n]"
> 2006-maj-18 09:54:11 org.apache.commons.httpclient.Wire wire
> FIN: >> "User-Agent: Jakarta Commons-HttpClient/3.0.1[\r][\n]"
> 2006-maj-18 09:54:11 org.apache.commons.httpclient.Wire wire
> FIN: >> "Authorization: NTLM
> TlRMTVNTUAADAAAAGAAYAFEAAAAAAAAAaQAAAAAAAABAAAAABQAFAEAAAAAMAAwARQAAAAAAAABp
> AAAABlIAAEVYR1NNR0JHVi1WTS1TMDAx6GwFxORp+QBWp6H66SNHv73L5BrOICog[\r][\n]"
> 2006-maj-18 09:54:11 org.apache.commons.httpclient.Wire wire
> FIN: >> "Host: GBGV-VM-S001[\r][\n]"
> 2006-maj-18 09:54:11 org.apache.commons.httpclient.Wire wire
> FIN: >> "[\r][\n]"
> 2006-maj-18 09:54:11 org.apache.commons.httpclient.Wire wire
> FIN: << "HTTP/1.1 411 Length Required[\r][\n]"
> 2006-maj-18 09:54:11 org.apache.commons.httpclient.Wire wire
> FIN: << "Server: Microsoft-IIS/5.0[\r][\n]"
> 2006-maj-18 09:54:11 org.apache.commons.httpclient.Wire wire
> FIN: << "Date: Thu, 18 May 2006 07:54:12 GMT[\r][\n]"
> 2006-maj-18 09:54:11 org.apache.commons.httpclient.Wire wire
> FIN: << "Connection: close[\r][\n]"
> 2006-maj-18 09:54:11 org.apache.commons.httpclient.Wire wire
> FIN: << "Content-Type: text/html[\r][\n]"
> 2006-maj-18 09:54:11 org.apache.commons.httpclient.Wire wire
> FIN: << "Content-Length: 147[\r][\n]"
> 2006-maj-18 09:54:11 org.apache.commons.httpclient.Wire wire
> FIN: << "<HTML>[\r]<HEAD>[\r]<META HTTP-EQUIV="Content-Type"
> CONTENT="text/html; charset=utf-8">[\r]</HEAD>[\r]<body><h2>HTTP/1.1 411
> Length Required</h2></body></HTML>"
> 
> Thanks in advance, 
> 
> Johan Karlberg
> ------------------------------------------------------------------------------
> 
> CONFIDENTIALITY AND DISCLAIMER NOTICE
> 
> This e-mail, including any attachments, is confidential and intended only for
> the addressee. If you are not the intended recipient, please notify us
> immediately and delete this e-mail from your system. Any use or disclosure of
> the information contained herein is strictly prohibited.
> 
> 
> ---------------------------------------------------------------------
> 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