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

HTTP - No need extra newline before the endBoundaryStream in writeMultipart #1420

Closed
kphuanghk opened this issue Jan 1, 2022 · 1 comment

Comments

@kphuanghk
Copy link

Regarding #1397 , after introduced newline in MultipartItem stream construction. It should no longer need to have newline before the endBoundaryStream . This will cause extra 2 bytes "/r/n" to the last multipart item.

Original:

        let wholePayload = Seq.append segments [newlineStream(); endBoundaryStream; ]

Shall be:

        /// per spec, close-delimiter := "--" boundary "--" CRLF ; no need extra newline
        let wholePayload = Seq.append segments [ endBoundaryStream; ]

Here's the skeleton program I used to test the two extra bytes issue:
TestProgram.fs.MD

For those affected by this issue, just need to remove extra two bytes for the affected files.

@cartermp
Copy link
Collaborator

cartermp commented Jan 1, 2022

Addressed in #1421

@cartermp cartermp closed this as completed Jan 1, 2022
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

No branches or pull requests

2 participants