[jcifs] jcifs 1.2.6 and HTTP 1.0 keep-alive connection
Michael B Allen
mba2000 at ioplex.com
Tue Nov 1 06:12:09 GMT 2005
On Mon, 31 Oct 2005 19:35:10 +0100 (CET)
Sanglard Fabien <sanglardf at yahoo.fr> wrote:
> Hello guys,
>
> I was working with jcifs 1.2.6/Tomcat 4.1.3 and i
> noticed that jcifs no longer
> supported Keep-alive Connection for HTTP 1.0. ( This
> feature is required by google Appliance servers).
>
> I took a look to the following post:
>
> http://lists.samba.org/archive/jcifs/2004-November/004334.html
>
> ...in which Johan suggested to set the content length
> to 0 during the NTLM authentication process.
>
> Just to make sure, i opened the class
> "jcifs.http.NtlmSsp" and noticed that modification
> requiered to make it works
> was not present.
>
> So, I modified the following:
>
> if (msg != null && msg.startsWith("NTLM ")) {
> ...
> to
>
> if (msg != null && msg.startsWith("NTLM ")) {
> resp.setContentLength(0);
> ...
>
> and it is now working perfectly.
>
> I guess someone removed that during an update or it
> was bugging other servlet implementation.
No, I think this just slipped through the cracks. But like the post you
site I think it should be after the setStatus call. Actually looking
at NtlmHttpFilter.java I think there's another place where we should
probably setContentLength(0).
I'll add this to The List.
Mike
More information about the jcifs
mailing list