>Number: 5725 >Category: mod_jserv >Synopsis: request.getRemoteHost() doesn't work with Apache JServ 1.1 >Confidential: no >Severity: serious >Priority: medium >Responsible: jserv >State: open >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Tue Feb 08 11:10:01 PST 2000 >Closed-Date: >Last-Modified: >Originator: [EMAIL PROTECTED] >Release: 1.3.9 >Organization: apache >Environment: 1. Solaris 2.5.1 with JDK 1.1.5 and JSDK2.0 as well as 2. Solaris 2.7 with JDK 1.2.1 and JSDK2.0 >Description: We have a servlet that worked just fine on environment 1 running Apache 1.3.9 + ApacheJServ 1.0
The problem is in a doGet() when we do like this: public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = new PrintWriter (response.getOutputStream()); out.print("Some HTML header stuff..."); out.println("<P>host=" + request.getRemoteHost()); out.print("Some HTML footer stuff..."); out.close(); } With Apache JServ 1.0 the request.getRemoteHost() returned the client-computers hostname. When we upgraded to Apache JServ 1.1 (both on environment 1 and 2) the request.getRemoteHost() started returning an empty string. >How-To-Repeat: See above code snippet. Unfortunately the servers are on our intranet :( >Fix: I have studied the webcvs tree, but haven't been able to figure out what goes wrong. There has apparently been some work done to the assignments of env_vars in readData() in org.apache.jserv.JServConnection.java between 1.0 and 1.1. >Release-Note: >Audit-Trail: >Unformatted: [In order for any reply to be added to the PR database, you need] [to include <[EMAIL PROTECTED]> in the Cc line and make sure the] [subject line starts with the report component and number, with ] [or without any 'Re:' prefixes (such as "general/1098:" or ] ["Re: general/1098:"). If the subject doesn't match this ] [pattern, your message will be misfiled and ignored. The ] ["apbugs" address is not added to the Cc line of messages from ] [the database automatically because of the potential for mail ] [loops. If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request from a ] [developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]