Re: jcifs 1.2.6 and HTTP 1.0 keep-alive connection

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: jcifs 1.2.6 and HTTP 1.0 keep-alive connection

Michael B Allen-4
I have applied setContentLength(0) to NtlmHttpFilter.java and NtlmSsp.java consistently. Hopefully this works cleanly with both HTTP/1.0 and HTTP/1.1 clients.

This will be in jcifs-1.2.7 to be released RSN.

Mike

On Tue, 1 Nov 2005 01:12:09 -0500
Michael B Allen <[hidden email]> wrote:

> On Mon, 31 Oct 2005 19:35:10 +0100 (CET)
> Sanglard Fabien <[hidden email]> 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
>