-
Notifications
You must be signed in to change notification settings - Fork 33
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
Conversation
@microsoft-github-policy-service agree "Donusoft" |
@microsoft-github-policy-service agree company="Donusoft" |
There was a problem hiding this 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 + '"'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add additional tests here https://github.com/microsoft/kiota-typescript/blob/main/packages/serialization/multipart/test/common/multipartSerializationWriter.ts for that additional behaviour please?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
@baywet so what's the status? |
@p30arena sorry I've been out for medical reasons most of this week.
|
Closing in favor of #1423 |
Fixes #1068