Re: Inviting feedback on my proposed "ASGI" spec

Cory Benfield <[email protected]> Fri, 11 Mar 2016 10:28:36 +0000
Newsgroups gmane.comp.python.web
Message-ID <[email protected]>
--===============3508629364728474288==
Content-Type: multipart/signed; boundary="Apple-Mail=_0ADA7646-CC02-47B0-818D-19980530CE45"; protocol="application/pgp-signature"; micalg=pgp-sha256


--Apple-Mail=_0ADA7646-CC02-47B0-818D-19980530CE45
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8


> On 10 Mar 2016, at 18:36, Andrew Godwin <[email protected]> wrote:
>=20
>=20
> Second, if it were me I=E2=80=99d remove the `status_text` field on =
the `Response` object. Custom status text is a terrible misfeature =
(especially as HTTP/2 doesn=E2=80=99t support it), and in 99% of cases =
you=E2=80=99re just wasting data by repeatedly sending the default =
phrase that the server already knows.
>=20
> Well, it IS optional; you only need to send it if you're changing it =
from the default or providing an unusual new value (e.g. 418). We could =
change the spec to say servers don't have to abide by it, too. I have =
done a project in the past with custom reason phrases, that's all :)

You monster! ;)

For what it=E2=80=99s worth, I object to the use of reason phrases =
because, as with all things in HTTP, they were far-too-broadly =
specified. The rules for parsing the reason phrase are super broad (the =
reason phrase allows \t, space, and then all bytes from 0x21 to 0xFF =
*excluding* 0x7F (ASCII DEL). This means that it=E2=80=99s sometimes =
possible to encode a reason phrase containing non-ASCII/non-Latin-1 =
codepoints in UTF-8 (I=E2=80=99ve seen this happen), and then everything =
gets really terrible really fast.

IMO, I think almost nothing would be lost by just quietly removing it =
from the specification. The only loss is in setting =E2=80=9Cunusual=E2=80=
=9D values, and FWIW I think that=E2=80=99s *also* unwise: if it can=E2=80=
=99t be found here[0] then the unusual status code is nothing but =
vanity, because it=E2=80=99s no more precise than the X00 version that =
already exists (no user agent can take action on it).

Again, just my 2=C2=A2.

Cory


[0]: =
https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml=


--Apple-Mail=_0ADA7646-CC02-47B0-818D-19980530CE45
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----

iQIcBAEBCAAGBQJW4p3UAAoJEHD+F/imQ+FbtUoP/RohTDu6c1nnkTpFGUOD7yxK
XCChEx+UUcQo8iToOMaAQUO4Vk1h7zNt0Q5lam08lVWNFsi1z/wWewxo2MSJNCSR
VQNzrPjlUBDOZ5IieqViV2q+iqPIAibtCZ7NK3QTR3edMEdh2VE+xV1BMbe20eGq
IxHz7i8qHdTlRLpObtswfqxezcWDb3CPIPueGvE32xTvE1mgjqRt8iTYe5vPiS5D
u9ftteMEBaihxBdTtN3o84n7+gpHpmWQfAiagxgyjLRdCcAdDFrn4UEEOZQ1RDuH
rcuUj9stZRH6y0KkIyaPnrazs4JTlqIGJHjEdJb1devgkJEkBlGliA0z0J7EEL8w
EKo+ABhKkma/hpuZojNXUbjUNNbsWrRCUOvCF+hd4vRWnJlNj8yp+a/WwfYexT2I
Bol4E7Xxi2b2zs0zVPNRs8BAlnq5FyP1SVSw+B00lSPwJcYqMBgunGLtSDpc7qd9
GtH0IC2zgGe6udxg1wedVCECjBbuFWLfSjNNfeeJKsE4HlSCrzqpMAa+xjgQlQG+
CunszHKAKzYZUTXI1/1QE4f6gwkTsZSsbDKtVQJmq02nYqpD2LfPSIYcGZcVZ9Vw
eg8SbLhdTOHt0idqmBlcjmw37O2OoDOa7RYHP4B8z1MdUMeVFTVF1U4zTrM3wci6
WwhE/yVYKq5ayDvd1XaW
=6esl
-----END PGP SIGNATURE-----

--Apple-Mail=_0ADA7646-CC02-47B0-818D-19980530CE45--

--===============3508629364728474288==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Web-SIG mailing list
[email protected]
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe: https://mail.python.org/mailman/options/web-sig/gcpw-web-sig%40m.gmane.org

--===============3508629364728474288==--