django / asgiref

ASGI specification and utilities
https://asgi.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
1.46k stars 207 forks source link

Contradiction between general and HTTP-specific sections on handling of send on a closed connection #441

Closed Hawk777 closed 5 months ago

Hawk777 commented 7 months ago

The HTTP section of the specification was, in spec version 2.4, updated to say this:

If send() is called on a closed connection the server should raise a server-specific subclass of IOError.

However, this appears to contradict the following text which appears in the Error Handling section of the ASGI main specification:

Note that messages received by a server after the connection has been closed are not considered errors. In this case the send awaitable callable should act as a no-op.

Perhaps the main specification should say something like “unless otherwise specified by an individual protocol”?

andrewgodwin commented 7 months ago

Yes, it should, I'll get that update in.

carltongibson commented 5 months ago

Fixed by 8cf847a27da34e7d4490b41b682f657b4f302eaa