classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ServerSocket.getLocalPort possible bug...


From: Mark Wielaard
Subject: Re: ServerSocket.getLocalPort possible bug...
Date: Mon, 10 Oct 2005 00:16:55 +0200

Hi Martin,

On Wed, 2005-09-21 at 13:20 -0400, Martin Cordova wrote:
> Winstone's author explained to me the following:
> 
> "I know what this is - it's because socket.getLocalPort() returns -1. I
> hit this when I was trying to run winstone on GCJ too, about 12 months
> ago, but didn't report it. The listener code does:
> 
>        req.setServerPort(socket.getLocalPort());
> "
> 
> I observed this bug when navigating to http://mylinuxBox from a remote
> windows box using IE6, IE complained about no response. I found in the
> servlet logs the following:
> 
> Headers prepared for writing: [Location: http://192.168.1.1:-1/index.htm
> 
> Which means that a redirect from root context to the welcome page was
> being sent to the browser, but the "-1" port troubled IE6.

Fixed now. Tested against the winstone setup you sent me and the test
servlet works nicely and reports the correct port number now.
See also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24006
The fix will be in the 0.19 release (hopefully first week of November).

Cheers,

Mark

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]