[Web-SIG] PATHINFO [was Random thoughts]

Gregory (Grisha) Trubetskoy grisha at modpython.org
Fri Oct 31 11:22:55 EST 2003



On Thu, 30 Oct 2003, Greg Ward wrote:

>   * the "PATHINFO" variable is not CGI-specific.

"the PATHINFO variable" only has meaning in a particular context, here is
the CGI definition:

  http://ken.coar.org/cgi/draft-coar-cgi-v11-03.txt
  Section 6.1.6:

   The PATH_INFO metavariable specifies a path to be interpreted
   by the CGI script. It identifies the resource or sub-resource
   to be returned by the CGI script, and it is derived from the
   portion of the URI path following the script name but
   preceding any query data.

>     Also, the Java servlet API has a getPathInfo() method

Yes, it does:

http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletRequest.html#getPathInfo()

   any extra path information associated with the URL the client sent when
   it made this request. The extra path information  follows the servlet
   path but precedes the query string and will start with a "/" character".

So this definition relies on the notion of a "servlet", which is OK since
this is part of J2EE. Then they go on to say that it is "Same as the value
of the CGI variable PATH_INFO", but it really isn't, "similar" would be a
better word.


I think I can live with a pathinfo that is "implementation specific", or
if we were to define a "Python Enterprise Architecture" with our own
definition of a servlet (or whatever), but for the Python standard library
to try to define it *outside of any context* would be a mistake I think.

Grisha



More information about the Web-SIG mailing list