[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/24006] New: ServerSocket.getLocalPort returns -1
From: |
martin dot cordova at gmail dot com |
Subject: |
[Bug classpath/24006] New: ServerSocket.getLocalPort returns -1 |
Date: |
21 Sep 2005 23:19:20 -0000 |
While testing Winstone servlet engine (winstone.sourceforge.net) on
JamVM 1.3.3 with Classpath 0.18, I found a possible bug:
getLocalPort returns -1 when it should return 80. In fact the same
program on the same box, when running with Sun or IBM JVM works fine.
So I suspect it may be a problem in ServerSocket implementation.
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.
Regards,
Martin Cordova
--
Summary: ServerSocket.getLocalPort returns -1
Product: classpath
Version: 0.18
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: classpath
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: martin dot cordova at gmail dot com
CC: bug-classpath at gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24006
- [Bug classpath/24006] New: ServerSocket.getLocalPort returns -1,
martin dot cordova at gmail dot com <=