Skip to content

Helper for parsing headers attributes#92

Open
JanTvrdik wants to merge 1 commit into
nette:masterfrom
JanTvrdik:pr/header_params
Open

Helper for parsing headers attributes#92
JanTvrdik wants to merge 1 commit into
nette:masterfrom
JanTvrdik:pr/header_params

Conversation

@JanTvrdik

Copy link
Copy Markdown
Contributor

I'm missing a helper for parsing headers, i.e something that turns attachment; filename="example.php" into [filename => 'example.php']

@dg

dg commented May 1, 2016

Copy link
Copy Markdown
Member

Can you add it?

@fprochazka

fprochazka commented May 1, 2016

Copy link
Copy Markdown
Contributor

@JanTvrdik Is there a standard for this? I haven't looked myself.

Shouldn't it be more something like [attachment => NULL, filename => 'example.php'] ?

@JanTvrdik

Copy link
Copy Markdown
Contributor Author

I'll, try to send PR today.

@Majkl578

Majkl578 commented May 1, 2016

Copy link
Copy Markdown
Contributor

Is there a standard for this?

It depends afaik. There is standard for Accept headers as well as Content-Type header (RFC 7231) at least.

@JanTvrdik

JanTvrdik commented May 1, 2016

Copy link
Copy Markdown
Contributor Author

It's not in one place, but if summarized, it leads to http://search.cpan.org/~ether/HTTP-Message-6.11/lib/HTTP/Headers/Util.pm

@JanTvrdik

JanTvrdik commented May 1, 2016

Copy link
Copy Markdown
Contributor Author

Uf, as it turned out there is no unified standard (as pointed out for example here). So I guess we need to pick a list of headers which we actually want to be able to parse decide based on that.


The stuff is so fucked up that even browsers don't implement it correctly http://greenbytes.de/tech/tc/httpcontenttype/


Related links (so I don't have to look for them again)

@dg dg force-pushed the master branch 2 times, most recently from 7981e33 to 3fb64f5 Compare July 21, 2016 12:07
@dg dg force-pushed the master branch 3 times, most recently from b9f06ea to 4f6d6c9 Compare December 20, 2016 14:30
@dg dg force-pushed the master branch 3 times, most recently from 2ff2f22 to 40175d7 Compare January 9, 2017 19:55
@dg dg force-pushed the master branch 12 times, most recently from 9c1fce0 to 96a1c05 Compare January 24, 2017 00:36
@dg dg force-pushed the master branch 17 times, most recently from caa05a6 to 708b922 Compare September 3, 2018 18:51
@dg dg force-pushed the master branch 4 times, most recently from d5b6f20 to 4b8dfd4 Compare October 25, 2018 18:26
@dg dg force-pushed the master branch 3 times, most recently from 980b18f to fe9a87f Compare November 23, 2018 16:03
@dg dg force-pushed the master branch 2 times, most recently from 746cdd5 to 3f62e09 Compare February 11, 2019 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants