This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2008年06月18日 09:28 by amaury.forgeotdarc, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| httpserver.patch | amaury.forgeotdarc, 2008年06月18日 12:54 | |||
| Messages (3) | |||
|---|---|---|---|
| msg68361 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) | Date: 2008年06月18日 09:28 | |
On windows, test_httpservers fails with the error: File "C:\python\py3k\Lib\http\server.py", line 1104, in run_cgi exec(open(scriptfile).read(), {"__name__": "__main__"}) File "<string>", line 3, in <module> File "C:\python\py3k\Lib\socket.py", line 222, in write return self._sock.send(b) TypeError: send() argument 1 must be bytes or read-only buffer, not str There are two problems there: - Lib/http/server.py still looks for os.popen2 or os.popen3 to start a subprocess; these functions have been removed, this code should be rewritten using the subprocess module. - the fallback method, which exec() the cgi script in the python interpreter, fails because sys.stdout should be set to a TextIOWrapper, not a binary socket file. Certainly the fallback method could be removed: every platform implements subprocess nowadays. |
|||
| msg68362 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) | Date: 2008年06月18日 12:53 | |
The attached patch uses subprocess when fork is not available. test_httpservers now passes on windows |
|||
| msg68379 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) | Date: 2008年06月18日 22:20 | |
Committed change r64389. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:35 | admin | set | github: 47383 |
| 2008年06月18日 22:20:24 | amaury.forgeotdarc | set | status: open -> closed resolution: fixed messages: + msg68379 |
| 2008年06月18日 12:54:21 | amaury.forgeotdarc | set | keywords:
+ patch files: + httpserver.patch messages: + msg68362 |
| 2008年06月18日 09:28:31 | amaury.forgeotdarc | create | |