From 1c5074d128190d8b19732c9a1af4ceeedcea217b Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Mon, 27 Mar 2017 10:06:38 -0700 Subject: [PATCH] Specs should be very precise. --- docs/asgi/www.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/asgi/www.rst b/docs/asgi/www.rst index d5bd5ca..0289f54 100644 --- a/docs/asgi/www.rst +++ b/docs/asgi/www.rst @@ -354,13 +354,16 @@ and try again. 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 send any data provided). * If ``accept`` is ``False``, reject the connection and do nothing else. + If ``bytes`` or ``text`` were also present they must be ignored. +* If ``bytes`` or ``text`` is present, accept the connection and send the data. * 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. Note that any close code integer - sent is ignored, as connections are rejected with HTTP's ``403 Forbidden``. + sent is ignored, as connections are rejected with HTTP's ``403 Forbidden``, + unless data is also sent, in which case a full WebSocket close is done with + the provided code. If received while the connection is established: