-
Notifications
You must be signed in to change notification settings - Fork 279
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 form requests need to use \r\n instead of only \n #74
Comments
Hi, I think this is more Snowcrash and Blueprint related issue then issue of Dredd itself. Bodies for both request and response are taken from the parser AST as they are. I think it will be solved in the future by possibility to submit raw binary blobs as assets of the blueprint. But please refer to the api-blueprint documentation project. |
Hi, I'm reopening it. I actually realised that Dredd can identify the multipart media type and add proper line endings to the request. |
Hey, I've also commented on the Blueprint project (apiaryio/api-blueprint#100), but that also includes syntax additions to keep things a bit sparser. |
Added function that replaces line feeds \n with carriage return \r in body. It also recalcultes the content length header.
Changed isMultipart added test
Both multiparty and parted (nodejs body parsing middlewares) do not accept Dredd generated multiform posts, due to line endings not being OK.
It seems they should be \r\n and Dredd always sends \n (perhaps because API Blueprint only supports that, so that's the actual data it's told to send).
So, feature request:
Dredd should make sure that the request are formatted decently. (:
Example request:
(See also: apiaryio/api-blueprint#100)
The text was updated successfully, but these errors were encountered: