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

Support continuations #2

Open
pluma opened this issue Jan 14, 2015 · 3 comments
Open

Support continuations #2

pluma opened this issue Jan 14, 2015 · 3 comments
Assignees

Comments

@pluma
Copy link

pluma commented Jan 14, 2015

If this is meant to become the go-to solution for parsing content-disposition headers, it should ideally support as many optional features as possible.

One that should be relatively easy to support is continuations. See the test case:

attachment; filename*0="foo."; filename*1="html"

should be parsed as:

{type: 'attachment', parameters: {filename: 'foo.html'}}

but is instead parsed as:

{type: 'attachment', parameters: {'filename*0': 'foo.', 'filename*1': 'html'}}

Also note the next test case:

attachment; filename*0*=UTF-8''foo-%c3%a4; filename*1=".html"

This currently results in garbage as the encoding prefix is not parsed.

@dougwilson dougwilson self-assigned this Jan 14, 2015
@dougwilson
Copy link
Contributor

Definitely. It should be added here :)

For some history, I originally decided not to implement it since it was optional, but thought about doing it anyway, but never did since I wasn't sure if anyone actually used it :)

For curiosity, do you happen to know a system/program that is generating them?

@pluma
Copy link
Author

pluma commented Jan 14, 2015

Nope, just trying to cover my bases ;)

I think it's more useful to have a single canonical module rather than a dozen diffently broken ones, so I'd prefer to have this feature added here.

@dougwilson
Copy link
Contributor

No problem. I was just curious :) It'll definitely be added!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants