httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 37757] New: - Broken environment in NPH-Scripts with UTF-8 encoded PATH_INFO
Date Fri, 02 Dec 2005 15:24:55 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37757>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37757

           Summary: Broken environment in NPH-Scripts with UTF-8 encoded
                    PATH_INFO
           Product: Apache httpd-2.0
           Version: 2.0.55
          Platform: Other
        OS/Version: Windows 2000
            Status: NEW
          Severity: major
          Priority: P2
         Component: Platform
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: andrea.obergfell@hauk-sasko.de


I have a CGI program (written in C) which runs fine on Linux with any (suitable)
PATH_INFO and also runs fine on Windows as long as there are no "special
characters" in PATH_INFO. However, if I call it with UTF-8 encoded special
characters in PATH_INFO, getenv doesn't give me back the special characters.

To be sure this has nothing to do with my CGI program I wrote a simple PERL
script which just prints the CGI environment:

#!C:/Programme/Perl/bin/perl.exe
#

print "HTTP/1.1 200 OK\n";
print "Content-type: text/plain\n\n";

print "Environment:\n";
while (($key,$value) = each %ENV) {
        print "$key=$value\n";
}

If I call it from the following URL:

http://my.win2k-host.name/cgi-bin/nph-printenv.pl/test/Übersicht

the special character at the beginning of the last part doesn't come as the
german special character it's supposed to be but as some other non-standard
character: PATH_INFO=/test/?bersicht
If I call the same script with the same browser from my Linux machine:

http://my.linux-host.name/cgi-bin/nph-printenv.pl/test/Übersicht

everything works fine.

The same happens if I mask the special UTF-8 character:

.../cgi-bin/nph-printenv.pl/test/%c3%9cbersicht

In Linux all is fine, in Windows PATH_INFO becomes /test/?bersicht

This is a real problem because the CGI program deals with file names it gets
from PATH_INFO and there seems no way to restore the file name from what comes
in PATH_INFO.

I almost forgot to say, the testing perl script works fine under Windows when
it's called as a non-NPH script (with the HTTP status line output removed of
course). So the problem seems to be related to the NPH stuff.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message