From a9062e5d28d93f2d45c13cd605c7e458503b100e Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Mon, 27 Mar 2017 09:59:42 -0700 Subject: [PATCH] Further clarify accept flow --- docs/asgi/www.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/asgi/www.rst b/docs/asgi/www.rst index a2d616b..d5bd5ca 100644 --- a/docs/asgi/www.rst +++ b/docs/asgi/www.rst @@ -355,11 +355,12 @@ If received while the connection is waiting for acceptance after a ``connect`` message: * If ``bytes`` or ``text`` is present, accept the connection and send the data. -* If ``accept`` is ``True``, accept the connection and do nothing else. -* If ``accept`` is ``False``, reject the connection (with close code 1000) and do nothing else. +* If ``accept`` is ``True``, accept the connection (and send any data provided). +* If ``accept`` is ``False``, reject the connection and do nothing else. * If ``close`` is ``True`` or a positive integer, reject the connection. If ``bytes`` or ``text`` is also set, it should accept the connection, send the - frame, then immediately close the connection. + frame, then immediately close the connection. Note that any close code integer + sent is ignored, as connections are rejected with HTTP's ``403 Forbidden``. If received while the connection is established: