Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helper for parsing headers attributes #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JanTvrdik
Copy link
Contributor

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

@dg
Copy link
Member

dg commented May 1, 2016

Can you add it?

@fprochazka
Copy link
Contributor

fprochazka commented May 1, 2016

@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
Contributor Author

I'll, try to send PR today.

@Majkl578
Copy link
Contributor

Majkl578 commented May 1, 2016

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
Copy link
Contributor Author

JanTvrdik commented May 1, 2016

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
Copy link
Contributor Author

JanTvrdik commented May 1, 2016

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)

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.

None yet

5 participants