[issue44107] HTTPServer can't close http client completely
Jonathan Schweder
report at bugs.python.org
Tue May 11 16:43:27 EDT 2021
Jonathan Schweder <jonathanschweder at gmail.com> added the comment:
@ueJone according to the (RFC)[https://datatracker.ietf.org/doc/html/rfc6455#section-1.4] the FIN/ACK is not normative, in other words is recommended but not required, I've checked the syscalls of the server, see it below:
```
...
1561 15143 write(2, "127.0.0.1 - - [11/May/2021 20:08"..., 60) = 60$
1562 15143 sendto(4, "HTTP/1.0 200 OK\r\nServer: SimpleH"..., 154, 0, NULL, 0) = 154$
1563 15143 sendto(4, "<!DOCTYPE HTML PUBLIC \"-//W3C//D"..., 728, 0, NULL, 0) = 728$
1564 15143 shutdown(4, SHUT_WR) = 0$
1565 15143 close(4) = 0$
...
```
As you can see, Python is not the one sending or not sending the ACK/FIN codes, this is coming from the underlining OS implementation of the `close()`.
My questions is, which OS are you using/testing this example?
----------
nosy: +jaswdr
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44107>
_______________________________________
More information about the Python-bugs-list
mailing list