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

fix malformed body and include additional optional data #1069

Closed
wants to merge 3 commits into from

Conversation

p30arena
Copy link
Contributor

@p30arena p30arena commented Feb 13, 2024

Fixes #1068

@p30arena
Copy link
Contributor Author

@microsoft-github-policy-service agree "Donusoft"

@p30arena
Copy link
Contributor Author

@microsoft-github-policy-service agree company="Donusoft"

Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! A couple of remarks to ensure this gets merged swiftly.

@@ -128,13 +131,18 @@ export function serializeMultipartBody(
writer.writeStringValue(undefined, "--" + boundary);
const part = parts[partName];
writer.writeStringValue("Content-Type", part.contentType);
let dispositionValue = 'form-data; name="' + part.originalName + '"';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addOrReplacePart changes are not consistent across languages, isn't it a problem?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://www.ietf.org/rfc/rfc2388.txt

it seems that filename is not mandatory.

The original local file name may be supplied as well, either as a
"filename" parameter either of the "content-disposition: form-data"
header or, in the case of multiple files, in a "content-disposition:
file" header of the subpart. The sending application MAY supply a
file name; if the file name of the sender's operating system is not
in US-ASCII, the file name might be approximated, or encoded using
the method of RFC 2231.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addOrReplacePart changes are not consistent across languages, isn't it a problem?

Can you provide more context for this please?

@p30arena
Copy link
Contributor Author

@baywet so what's the status?

@baywet
Copy link
Member

baywet commented Feb 23, 2024

@p30arena sorry I've been out for medical reasons most of this week.
I'm waiting for two things:

@shemogumbe shemogumbe self-assigned this Oct 15, 2024
@shemogumbe
Copy link
Contributor

Closing in favor of #1423

@shemogumbe shemogumbe closed this Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

MultiPart Request Error
3 participants