proxied PUTs work

Gordon Dakin writes:
 > After a couple of small tweaks, anyway.  I used the modified Request class
 > you sent me.  I made one more modification to getInputStream() -- maybe
 > I'm not initializing something, which forces me to change:
 > 
 >         if ((major == 1) && (minor == 0) && (in == null)) {
 >             String m = getMethod();
 >             if (m.equals("POST") || m.equals("PUT")) {
 >                 keepcon = false;
 >                 in      = parser.getInputStream();
 >             }
 >         }
 > 
 > to:
 > 
 >        if  (in == null) {
 >             String m = getMethod();
 >             if (m.equals("POST") || m.equals("PUT")) {
 >                 keepcon = false;
 >                 in      = parser.getInputStream();
 >             }
 >         }

That you need this change is really strange, as indicated in a comment
around this piece of code, all HTTP/1.1 requests have to be handled
before the test (hence the major/minor check). I would be glad to have
more details here

 > I had one other glitch that seems more like a Java problem than jigsaw:
 > 
 > This loop hangs for some reason:
 > 
 >        for (int got = 0; (got = in.read(buf)) > 0;)
 >            fout.write(buf, 0, got);
 > 
 > in Request.newContent .
 > 
 > It seems to keep reading after all input is read, because it doesn't
 > hang if I limit the number of iterations to the actual number needed.
 > Any ideas?

A ContentLengthInputStream problem, maybe. I know I have recently
fixed something like that in the proxy. A thread dump might help here
...

Anselm.

Received on Monday, 25 November 1996 07:39:50 UTC