msg87190 - (view) |
Author: Thijs Triemstra (thijs) |
Date: 2009-05-04 23:10 |
While testing the following script on Jython 2.5b4 I noticed it returned SERVER_SOFTWARE = 'WSGIServer/0.1 Python/2.5b4+' instead of the expected 'WSGIServer/0.1 Jython/2.5b4+'. This is because the word 'Python' is hardcoded in simple_server.py; "sys_version = "Python/" + sys.version.split()[0]". I suggest using the real name of the runtime instead of hardcoding it. from wsgiref.simple_server import make_server, demo_app httpd = make_server('', 8000, demo_app) print "Serving HTTP on port 8000..." # Respond to requests until process is killed httpd.serve_forever() # Alternative: serve one request, then exit httpd.handle_request() |
|
|
msg93177 - (view) |
Author: Thijs Triemstra (thijs) |
Date: 2009-09-27 16:06 |
Here's a patch that uses platform.python_implementation instead, producing: >>> from wsgiref import simple_server >>> simple_server.software_version 'WSGIServer/0.1 CPython/2.7a0' >>> This will become relevant when Jython and IronPython start using these modules. |
|
|
msg112708 - (view) |
Author: Terry J. Reedy (terry.reedy) *  |
Date: 2010-08-03 22:21 |
In the absence of doc claiming the requested behavior, this is a feature request. In principle, it seems sensible, but I do not use the module. Support from more than one person, perhaps from python-list or web-sig list (not sure of name) would be good. Aside from that, patch replaces 'Python' with platform.python_implementation(). For me, that is 'CPython'. Some might prefer the binary 'python' (or whatever), so I am not this is the right replacement. |
|
|
msg164862 - (view) |
Author: Greg Roodt (groodt) * |
Date: 2012-07-07 14:47 |
Bumping as part of bug scrub at EuroPython. Patch seems sensible to me. Obvious options to me are to either accept patch, close bug or write docs. Bug has not seen activity in years, so can probably be closed. |
|
|
msg164919 - (view) |
Author: Terry J. Reedy (terry.reedy) *  |
Date: 2012-07-07 18:37 |
Phillip, this is a trivial wsgiref patch. Do you have any opinion? |
|
|
msg164942 - (view) |
Author: Senthil Kumaran (orsenthil) *  |
Date: 2012-07-07 21:33 |
I have fixed this in the changeset 34e705fa4da4. SERVER_SOFTWARE term can be made more specific to note the implementation as various suggestions say. I personally think, it is worthy to make change in 3.3 itself as its been open from a long time and it is strictly not a feature as such. |
|
|
msg164947 - (view) |
Author: PJ Eby (pje) *  |
Date: 2012-07-07 21:58 |
On Sat, Jul 7, 2012 at 2:37 PM, Terry J. Reedy wrote: > Phillip, this is a trivial wsgiref patch. Do you have any opinion? > Nope. |
|
|
msg164972 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2012-07-08 08:11 |
You need to indent the block after the versionchanged directive. Also, I believe only bug fixes should go into 3.3 now that we are in beta. |
|
|