problem with Reply.setStream(InputStream)

Ying Xie writes:
 > I tried to seperate the line pointed by "------>" into two statements and made 
 > sure that the exception was thrown at connection.getInputStream(). It was a 
 > java.lang.NumberFormatException. 
 > 
 > How could this happen? Any hint?

Yes, I think I got it: Jigsaw way of emiting the reply status line to
a request, although not in-compliant with the spec, emits mutliple
blacns instead of a single one:

Instead of the normal:
HTTP/1.0 200 OK
Jigsaw says:
HTTP/1.0  200  OK

You can fix the bug in Reply.java (hum unfortunatelly I don't have the
old version handy), look around the emit method, there is a line that
should look like
emit("HTTP/1.0 "
     , status
     , blah)
Remove the white sapce in the version string, you should be all
set. Also, the URLConnection will be fixed to accept more spaces in
next JDK release.

Anselm.

Received on Thursday, 25 July 1996 14:13:48 UTC