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

Added support for Multipart blueprint specifications #56

Merged
merged 1 commit into from
May 19, 2015

Conversation

subinvarghesein
Copy link
Contributor

For request containing multipart form data, browsers provide dynamic form boundary values (like WebKitFormBoundaryjy0tIlk46ESOni0H) which in turn change the content type (to something like multipart/form-data; boundary=---WebKitFormBoundaryjy0tIlk46ESOni0H)

Moreover, request body also can be different because of form boundary.

Sample Request body:

    ------WebKitFormBoundaryjy0tIlk46ESOni0H
    Content-Disposition: form-data; name="documentImportId"

    undefined
    ------WebKitFormBoundaryjy0tIlk46ESOni0H
    Content-Disposition: form-data; name="qquuid"

    e3a2d2ed-0554-42c2-9629-3fad804547d8
    ------WebKitFormBoundaryjy0tIlk46ESOni0H
    Content-Disposition: form-data; name="qqfilename"

    tmprp8v07
    ------WebKitFormBoundaryjy0tIlk46ESOni0H
    Content-Disposition: form-data; name="qqtotalfilesize"

    -1
    ------WebKitFormBoundaryjy0tIlk46ESOni0H
    Content-Disposition: form-data; name="qqfile"; filename="tmprp8v07"
    Content-Type: application/octet-stream

    ------WebKitFormBoundaryjy0tIlk46ESOni0H--

This patch supports this behavior. If content types provided in the request and in spec are both "multipart/form-data" then request body check is not performed and the relevant response provided in the spec is served.

Todo:

  • Check how to serve different responses based on the request body if content type is multipart/form-data in both cases

@yakovkhalinsky
Copy link
Contributor

Merging

yakovkhalinsky added a commit that referenced this pull request May 19, 2015
Added support for Multipart blueprint specifications
@yakovkhalinsky yakovkhalinsky merged commit 78f07f1 into Aconex:master May 19, 2015
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.

2 participants