Re: Inviting feedback on my proposed "ASGI" spec
Andrew Godwin <[email protected]> Thu, 10 Mar 2016 11:32:46 -0800
| Newsgroups | gmane.comp.python.web |
|---|---|
| Message-ID | <CAFwN1uo8zZeenQ1LLpSdJ89JzJQPomLQK9F2POiTuGq9kx2wvw@mail.gmail.com> |
--===============3050087585808571000== Content-Type: multipart/alternative; boundary=001a113d46942c2230052db6e244 --001a113d46942c2230052db6e244 Content-Type: text/plain; charset=UTF-8 On Thu, Mar 10, 2016 at 10:57 AM, <[email protected]> wrote: > On Thu, 10 Mar 2016, Andrew Godwin wrote: > > I think you're right, and I've just been stubbornly trying to use a dict as >> it's slightly "nicer". I honestly considered making both sides dict and >> cookies the separate thing as they're the only special case, but I suspect >> that multiple headers are one of those things that might turn out to be >> useful for some broken client/new feature someday. >> > > It sounds like you consider multiple headers of the same name in > request and response as some kind of bug or fault. It's not it is > perfectly legit and something I want to be able to do in my webbby > frameworks. Vary is the main one. > > I know that I can join on ',' in a single header when it is > represented in a dict but "meh". > Well, the protocol server would be the thing that's doing the joining if it sees multiple headers - you'd always see comma-joined headers from clients as an ASGI application, which I like as I like consistency. > > I totally agree that dicts are much nicer to work with, so I'm not > sure what the ideal solution is, but I just wanted to raise that > point about multiple headers. As you were. Carry on. etc. Yeah, I find the whole comma thing a bit weird, and sort of wonder if it's actually a workable thing for all HTTP clients. I hope it is. Andrew --001a113d46942c2230052db6e244 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quo= te">On Thu, Mar 10, 2016 at 10:57 AM, <span dir=3D"ltr"><<a href=3D"mai= lto:[email protected]" target=3D"_blank">[email protected]</a>></s= pan> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex= ;border-left:1px #ccc solid;padding-left:1ex"><span class=3D"">On Thu, 10 M= ar 2016, Andrew Godwin wrote:<br> <br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> I think you're right, and I've just been stubbornly trying to use a= dict as<br> it's slightly "nicer". I honestly considered making both side= s dict and<br> cookies the separate thing as they're the only special case, but I susp= ect<br> that multiple headers are one of those things that might turn out to be<br> useful for some broken client/new feature someday.<br> </blockquote> <br></span> It sounds like you consider multiple headers of the same name in<br> request and response as some kind of bug or fault. It's not it is<br> perfectly legit and something I want to be able to do in my webbby<br> frameworks. Vary is the main one.<br> <br> I know that I can join on ',' in a single header when it is<br> represented in a dict but "meh".<br></blockquote><div><br></div><= div>Well, the protocol server would be the thing that's doing the joini= ng if it sees multiple headers - you'd always see comma-joined headers = from clients as an ASGI application, which I like as I like consistency.</d= iv><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0= .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br> I totally agree that dicts are much nicer to work with, so I'm not<br> sure what the ideal solution is, but I just wanted to raise that<br> point about multiple headers. As you were. Carry on. etc.</blockquote><div>= <br></div><div>Yeah, I find the whole comma thing a bit weird, and sort of = wonder if it's actually a workable thing for all HTTP clients. I hope i= t is.</div><div><br></div><div>Andrew=C2=A0</div></div></div></div> --001a113d46942c2230052db6e244-- --===============3050087585808571000== 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 --===============3050087585808571000==--