ID:               22808
 User updated by:  struman at nuparadigm dot com
 Reported By:      struman at nuparadigm dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Sockets related
 Operating System: Windows XP
 PHP Version:      4.3.0
 New Comment:

I am able to reproduce the problem with acouple of other client
libraries.. not a PHP issue.. Sorry


Previous Comments:
------------------------------------------------------------------------

[2003-03-20 16:21:29] struman at nuparadigm dot com

Apache 2.0.42 with SAPI module

Default install with sockets module.

When connecting to a java Servlet from PHP. Servlet always reports that
port 80 is the port that it is being connected too.

I can telnet to 127.0.0.1 8080 and issue
GET /TestServlet
HTTP/1.0
Host: 127.0.0.1

And the Servlet reports the correct port.

Also reports the correct port when browing URL with Web Browser.

Only in PHP does the port default to 80.

My Guess it that sin_port is being set incorrectly.

-- Test Code  PHP --
$fp = fsockopen("127.0.0.1", 8080, $fsockopen_errnum,
$fsockopen_errstr, $fsockopen_timeout);
$sHeader = "GET " . "/TestServlet";
$sHeader .= " HTTP/1.0\r\n";
$sHeader .= "Host: 127.0.0.1\r\n\r\n";
fputs($fp, $sHeader);

-- Servlet Code --
public void doGet(HttpServletRequest request, HttpServletResponse
response) throws IOException, ServletException {
System.out.println("Serverport="+request.getServerPort());
}



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=22808&edit=1

Reply via email to