svn commit: lorikeet r660 - in trunk/mod_ntlm_winbind: .

lmuelle at samba.org lmuelle at samba.org
Wed Nov 8 23:20:37 GMT 2006


Author: lmuelle
Date: 2006-11-08 23:20:37 +0000 (Wed, 08 Nov 2006)
New Revision: 660

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=lorikeet&rev=660

Log:
[PATCH] Don't set content length in auth reply

Found a problem with the 401 response coming back from apache after the
client sends their NTLMSSP_NEGOTIATE request. The code is setting the
content length header to zero, but Apache was including it's own error
page in the response body. According to RFC2616, a 401 response doesn't
have to have a zero length, so probably it's the auth module which is at
fault. Just removing the code which sets this causes Apache to set the
content encoding to "chunked" which takes care of the problem. Tested on
Apache 2.0.54 (Debian Sarge).

Signed-off-by: Kevin Shanahan <kmshanah at ucwb.org.au>

Tested also for several Apache versions on SUSE Linux with http and
https.

Modified:
   trunk/mod_ntlm_winbind/mod_ntlm_winbind.c


Changeset:
Modified: trunk/mod_ntlm_winbind/mod_ntlm_winbind.c
===================================================================
--- trunk/mod_ntlm_winbind/mod_ntlm_winbind.c	2006-11-08 03:57:34 UTC (rev 659)
+++ trunk/mod_ntlm_winbind/mod_ntlm_winbind.c	2006-11-08 23:20:37 UTC (rev 660)
@@ -456,9 +456,6 @@
     /* Read negotiate from ntlm_auth */
 
     apr_table_setn(r->err_headers_out,
-                  "Content-Length" , "0");
-
-    apr_table_setn(r->err_headers_out,
                   r->proxyreq ? "Proxy-Authenticate" : "WWW-Authenticate",
                   apr_psprintf(r->pool, "%s %s", auth_scheme, reply));
 



More information about the samba-cvs mailing list