[Bug 61191] New: CGIServlet puts too much of the path in the SCRIPT_NAME environment variable

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 61191] New: CGIServlet puts too much of the path in the SCRIPT_NAME environment variable

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61191

            Bug ID: 61191
           Summary: CGIServlet puts too much of the path in the
                    SCRIPT_NAME environment variable
           Product: Tomcat 9
           Version: 9.0.0.M21
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: [hidden email]
          Reporter: [hidden email]
  Target Milestone: -----

The environment variable SCRIPT_NAME should be

/cgi-bin/printenv.pl

but is

/var/www/foo/bar/cgi-bin/printenv.pl

See http://www.ietf.org/rfc/rfc3875:
"No PATH_INFO segment (see section 4.1.5) is included in the SCRIPT_NAME
value."

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 61191] CGIServlet puts too much of the path in the SCRIPT_NAME environment variable

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61191

Mark Thomas <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Mark Thomas <[hidden email]> ---
PATH_INFO refers to path segments in the URI that appear after the script. For
example:

/cgi-bin/printenv.pl/this/is/the/path/info

The SCRIPT_NAME provided by Tomcat correctly excludes this.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 61191] CGIServlet puts too much of the path in the SCRIPT_NAME environment variable

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61191

--- Comment #2 from jm009 <[hidden email]> ---
Sorry for the invalid bug report.
I was trying to run nextcloud (PHP) with the CGIServlet.
In fact it is the PHP interpreter, that changes SCRIPT_NAME.
I am not familiar with PHP and I did not know that the PHP interpreter sets
SCRIPT_NAME.
I filed a bug for PHP: https://bugs.php.net/bug.php?id=74773

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]