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

multipart/mixed support #75

Merged
merged 0 commits into from
Dec 7, 2011
Merged

multipart/mixed support #75

merged 0 commits into from
Dec 7, 2011

Conversation

gleber
Copy link

@gleber gleber commented Nov 23, 2011

Hello Roberto

I have implemented basic support for multipart/mixed and did some improvements of robustness of multipart/form-data parsing.

I'd be glad if it is merged in. If something is wrong in the code, please let me know.

Best,
Gleb

@ostinelli
Copy link
Owner

bummer, i see ^^_

do you have any testings for the multipart/mixed case? what have you been using to provide a client for it?

thank you,

r.

@gleber
Copy link
Author

gleber commented Nov 28, 2011

I've fixed one bug related to handling of multiparts without preamble (regex was too aggressive).

Also I've added a test case with uses curl. Initially multipart/mixed support was needed for https://github.com/gleber/exat , which initially used it's own internal http server, but misultin is much better, so I did a switch.

@ostinelli
Copy link
Owner

hi gleber,

i've been digging a little more on this. shouldn't multipart/mixed be used as content of multipart/form-data when multiple files are to be returned as the result of a single form entry?

http://www.w3.org/TR/html4/interact/forms.html#didx-multipartform-data

i see you are using multipart/mixed as a Content-Type of a request header, i'm not really sure which browsers support this and what for, can you please enlighten me?

@gleber
Copy link
Author

gleber commented Dec 6, 2011

Yes, that's correct. But multipart/mixed is top-level correct encoding for HTTP post too. I can't recall any cases of it being used this way by browsers, but this is correct per RFC (as far as I know) and some standards use it [1]. It's not a perfect implementation of all cases of multipart/mixed usage, but it covers at least one :)

1: FIPA Agent Message Transport Protocol for HTTP Specification - http://www.fipa.org/specs/fipa00084/PC00084B.pdf

@gleber gleber merged commit 6a4c9ea into ostinelli:master Dec 7, 2011
@gleber
Copy link
Author

gleber commented Dec 7, 2011

Hmm... I separated this code into a branch https://github.com/gleber/misultin/tree/feature/multipart-mixed-support and for some reason git detected as if I closed this pull request, which is not true >.>

@ostinelli
Copy link
Owner

apparently i cannot re-open it myself either.

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

Successfully merging this pull request may close these issues.

2 participants