Skip to content

Batch request (http multipart) response structure #34

@the-shultz

Description

@the-shultz

Hi

We want to start and use your framework.
Our server side is Java (tomcat), so we need to write ourselves the processing of the multipart request, and assemble the aggregated response to be delivered back to the client.
I couldn't find on your documentation what should be the structure of the response.
I have searched and found these two links describing how a multipart response should look alike, but then when comparing them to your code that processes the batch response, there are some inconsistencies:
https://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html
https://tools.ietf.org/id/draft-snell-http-batch-00.html#http-batch

After investigating the processResponse method, I came to the below structure:
--[boundry]
content-type: application/ (must be first among all headers, otherwise headers will be omitted)
[headers]..[headers]
[status (in the form of version code text)]
[empty line to separate between the metadata and the actual response data]
[the actual response data, which is carried until the next --boundry appears]

In addition, it seems that there is an assumption that the order of the responses is the same as the order of the requests (so the correlation between the response and request comes from there matching order).

Finally, I saw that the parsing of the date header, if such exists, omits the time and timezone fragments of it (you are treating it as a regular header and takes hardcoded the first part of it and only it).

My question is:
Am I correct in my analysis ? did I miss something or got confused with anything ? are there any other limitation I need to take in mind in order to have a proper structure for the response ?
Do you think you can add up a complete formal structure of the response to the documentation ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions