[issue43972] Simple HTTP Request Handler in http.server does not set a content-length and does not close connections on 301s
Senthil Kumaran
report at bugs.python.org
Sat May 1 13:18:26 EDT 2021
Senthil Kumaran <senthil at uthcode.com> added the comment:
Hi Stephen,
Could you give a brief demo of using curl to see the problematic behavior.
I have testing with a version python and saw that without content length, the curl was behaving properly.
```
$mkdir foo
$#add index.html to directory foo
$python -m http.server foo
$ curl -I -L http://0.0.0.0:8082/foo
HTTP/1.0 301 Moved Permanently
Server: SimpleHTTP/0.6 Python/3.6.13+
Date: Sat, 01 May 2021 17:16:14 GMT
Location: /foo/
HTTP/1.0 200 OK
Server: SimpleHTTP/0.6 Python/3.6.13+
Date: Sat, 01 May 2021 17:16:14 GMT
Content-type: text/html
Content-Length: 171
Last-Modified: Sat, 01 May 2021 14:34:48 GMT
```
And
```
curl --version
curl 7.65.3
```
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43972>
_______________________________________
More information about the Python-bugs-list
mailing list