[Web-SIG] Inviting feedback on my proposed "ASGI" spec

Andrew Godwin andrew at aeracode.org
Thu Mar 10 14:32:46 EST 2016


On Thu, Mar 10, 2016 at 10:57 AM, <chris.dent at gmail.com> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/web-sig/attachments/20160310/eb650e33/attachment-0001.html>


More information about the Web-SIG mailing list