-
Notifications
You must be signed in to change notification settings - Fork 839
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
Line break should be CRLF, not LF. #726
Comments
Are you facing this with any POST/PUT requests made with form-data, or is there a particular URL/set of values that throw this error? |
I'd been testing my API with POSTMan and tried to POST files, but i had got an error "MIME multipart message is not complete". When I do it with Fiddler, POST complete succesfull. |
Can you give a sample URL on which this occurs, or a video of this problem? I ran the following collection - https://www.getpostman.com/collections/1a031679183d03761670 , which uses form-data, and sends two form values, and a file, and it worked fine. Load the collection into Postman, replace test.csv with a file from your machine, and see if the error occurs. |
Get an error: "ExceptionMessage": "Unexpected end of MIME multipart stream. MIME multipart message is not complete."
See that lacks CR character. If correct body request in fiddler, request is executed correctly. |
If you're uploading a file, you should use the 'form-data' mode, not the raw mode. The form-data mode has an option of uploading files. |
Ok! It works! Sorry for your time spent. But why not make CRLF as line break in raw mode? |
Line endings are OS dependent hence we don't change what is present. In most cases this does not matter. We have the form-data and binary modes for uploading files so should satisfy all use cases. |
This doesn't seem ok. Why so? Because, looking at the HTTP/1.1 spec here, one can clearly see that Then, checking out section 3.7 of the same spec, CRLF is always (!!!) a valid newline character, however in some cases a CR or LF alone are permitted. Quick excerpts: 3.7.2 - multipart I believe that you should change the behaviour to conform with the HTTP spec. |
I am looking at a response that I know has CRLF in it yet when displayed under the raw response I am not seeing them. This is confusing and leads one to believe that they are missing in the response. When I go to other tools that display the raw response I see them shown as line separators. I tried the Response (formatted) tab but it is not displaying anything, the display area is blank. The response media type is text/csv. The link address for the formatted response tab is chrome-extension://ecjfcmddigpdlehfhdnnnhfgihkmejin/index.html#tabs-formatted. Not sure if it is looking for tabs and that is why it is not displaying anything. If the line separators showed up in the under formatted tab that would be helpful and acceptable. |
From https://tools.ietf.org/html/rfc7231 ("Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content")
|
@abotalov I believe the section you quoted goes on to say:
The following section goes on to say:
I believe what Postman should do is to convert all LF to CRLF, at least when using the 'raw' option for the request body. |
Cool program! I have a soft of similar issue though. I'm running the linux client and looking to intentionally put a CRLF into a raw post body but just because of OS differences I have no way to type/paste in exact text into the window. It seems to auto-change intentional CRLF's into just LF's. I think it would be convenient if they could be escaped in some way -- eg. \r\n - like a sort of 3rd option raw-escapable that would allow all the escape codes you would expect of a string in JS. Or maybe some way to set rules like to treat enter as CRLF vs LF. This might satisfy some other people's concerns mentioned above. |
Ok, I think I just solved my own issue -- in this post: |
When requesting with 'form-data' PostMan send LF as linebreak and error happen:
"Unexpected end of MIME multipart stream. MIME multipart message is not complete" exception while parsing multipart form.
The text was updated successfully, but these errors were encountered: