Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
ecfd9603
Commit
ecfd9603
authored
Dec 09, 2020
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comments about the state of SCRIPT_NAME.
Refs
https://github.com/gevent/gevent/issues/1667
parent
e075751c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
src/gevent/pywsgi.py
src/gevent/pywsgi.py
+16
-0
No files found.
src/gevent/pywsgi.py
View file @
ecfd9603
...
...
@@ -1085,6 +1085,22 @@ class WSGIHandler(object):
"""
env
=
self
.
server
.
get_environ
()
env
[
'REQUEST_METHOD'
]
=
self
.
command
# SCRIPT_NAME is explicitly implementation defined. Using an
# empty value for SCRIPT_NAME is both explicitly allowed by
# both the CGI standard and WSGI PEPs, and also the thing that
# makes the most sense from a generic server perspective (we
# have no hierarchy or understanding of URLs or files, just a
# single application to call. The empty string represents the
# application root, which is what we have). Different WSGI
# implementations handle this very differently, so portable
# applications that rely on SCRIPT_NAME will have to use a
# WSGI middleware to set it to a defined value, or otherwise
# rely on server-specific mechanisms (e.g, on waitress, use
# ``--url-prefix``, in gunicorn set the ``SCRIPT_NAME`` header
# or process environment variable, in gevent subclass
# WSGIHandler.)
#
# See https://github.com/gevent/gevent/issues/1667 for discussion.
env
[
'SCRIPT_NAME'
]
=
''
if
'?'
in
self
.
path
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment