[issue10486] http.server doesn't set all CGI environment variables

2020-12-01 Thread Senthil Kumaran
Senthil Kumaran added the comment: I spent some time reviewing and researching the specification. It also says The server is not required to create meta-variables for all the header fields that it receives. And this in issue, open since 2010, we have issue two different set of variab

[issue10486] http.server doesn't set all CGI environment variables

2020-12-01 Thread Senthil Kumaran
Change by Senthil Kumaran : -- keywords: +patch pull_requests: +22473 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23604 ___ Python tracker _

[issue10486] http.server doesn't set all CGI environment variables

2020-08-22 Thread Senthil Kumaran
Senthil Kumaran added the comment: Hello Maarten, > Using cgitb, I found out that the webdriver expects the environment variable > `HTTP_X_URWID_METHOD` to be set. The javascript sets the "X-Urwid-Method" > header (using XmlHttpRequest), but these are not visible by the CGI python > script.

[issue10486] http.server doesn't set all CGI environment variables

2020-08-11 Thread Maarten
Maarten added the comment: The CGI examples of urwid (see http://urwid.org/manual/displaymodules.html#cgi-web-display-module-web-display) don't work on http.server because of missing meta variables. Using cgitb, I found out that the webdriver expects the environment variable `HTTP_X_URWID_M

[issue10486] http.server doesn't set all CGI environment variables

2018-11-13 Thread Glenn Linderman
Glenn Linderman added the comment: That's interesting, Pierre, I hadn't really read the RFC carefully, to realize that many of the "missing" variables from Apache are HTTP headers, and that section 4.1.18 tell how to convert HTTP headers to meta variables. The code in server.py 3.6 (Sorry, I

[issue10486] http.server doesn't set all CGI environment variables

2018-11-13 Thread Pierre Quentel
Pierre Quentel added the comment: The QUERY_STRING value is always set by the code at lines 1135-1137 of http.server: for k in ('QUERY_STRING', 'REMOTE_HOST', 'CONTENT_LENGTH', 'HTTP_USER_AGENT', 'HTTP_COOKIE', 'HTTP_REFERER'): env.setdefault(k, "") The RFC for CGI

[issue10486] http.server doesn't set all CGI environment variables

2018-11-13 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Glenn, I'm not aware of a document that defines CGI better than the RFC and I don't know it enough to disgress from the published standard (even if it is not what isdone today as I don't know the current practices enough). Here is the variables defined by ng

[issue10486] http.server doesn't set all CGI environment variables

2018-11-13 Thread Glenn Linderman
Glenn Linderman added the comment: Rémi Lapeyre, glad to see your interest here, as this is an old and languishing bug. I would have hoped based on my input, that had there been anyone that was maintaining the Python web server code, that they might have done a more complete analysis than I

[issue10486] http.server doesn't set all CGI environment variables

2018-11-12 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: AUTH_TYPE, CONTENT_LENGTH, CONTENT_TYPE, REMOTE_USER are present REMOTE_IDENT is not but I'm not sure it's worth adding. I can send a PR to add REMOTE_HOST and remove the condition for QUERY_STRING. Otherwise, I don't think the other environment variables shoul

[issue10486] http.server doesn't set all CGI environment variables

2018-11-12 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: The reference given in https://github.com/python/cpython/blob/b36b0a3765bcacb4dcdbf12060e9e99711855da8/Lib/http/server.py#L1074 is not accessible anymore. I think we should replace it by https://tools.ietf.org/html/rfc3875#section-4.1 -- _

[issue10486] http.server doesn't set all CGI environment variables

2018-11-10 Thread Pierre Quentel
Change by Pierre Quentel : -- nosy: +quentel ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue10486] http.server doesn't set all CGI environment variables

2018-11-10 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +remi.lapeyre ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue10486] http.server doesn't set all CGI environment variables

2015-02-12 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: +demian.brecht ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue10486] http.server doesn't set all CGI environment variables

2015-02-11 Thread Martin Panter
Martin Panter added the comment: Issue 5054 is for HTTP_ACCEPT -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue10486] http.server doesn't set all CGI environment variables

2012-08-12 Thread Berker Peksag
Changes by Berker Peksag : -- versions: +Python 3.3 -Python 2.6, Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue10486] http.server doesn't set all CGI environment variables

2012-04-16 Thread Glenn Linderman
Glenn Linderman added the comment: Reading the CGI 1.1 spec, it says: The QUERY_STRING value provides the query-string part of the Script-URI. (See section 3.3). The server MUST set this variable; if the Script-URI does not include a query component, the QUERY_STRING MUST be defin

[issue10486] http.server doesn't set all CGI environment variables

2011-03-17 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- assignee: -> orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue10486] http.server doesn't set all CGI environment variables

2010-11-23 Thread Glenn Linderman
Glenn Linderman added the comment: Took a little more time to do a little more analysis on this one. Compared a sample query via Apache on Linux vs http.server, then looked up the CGI RFC for more info: DOCUMENT_ROOT: ... GATEWAY_INTERFACE: CGI/1.1 HTTP_ACCEPT: text/html,application/xhtml+xm

[issue10486] http.server doesn't set all CGI environment variables

2010-11-21 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +facundobatista, fdrake, orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue10486] http.server doesn't set all CGI environment variables

2010-11-20 Thread Glenn Linderman
New submission from Glenn Linderman : HTTP_HOST HTTP_PORT REQUEST_URI are variables that my CGI scripts use, but which are not available from http.server or CGIHTTPServer (until I added them). There may be more standard variables that are not set, I didn't attempt to enumerate the whole list.