Skip to content

Commit dd88ba7

Browse files
committed
Do not start multipart/form-data content with new line
Fixes #9904
1 parent 0ceba0f commit dd88ba7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/swagger-codegen/src/main/resources/cpprest/multipart-source.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void MultipartFormData::writeTo( std::ostream& target )
5959
std::shared_ptr<HttpContent> content = m_Contents[i];
6060
6161
// boundary
62-
target << "\r\n" << "--" << utility::conversions::to_utf8string( m_Boundary ) << "\r\n";
62+
target << (i > 0 ? "\r\n" : "") << "--" << utility::conversions::to_utf8string( m_Boundary ) << "\r\n";
6363
6464
// headers
6565
target << "Content-Disposition: " << utility::conversions::to_utf8string( content->getContentDisposition() );

0 commit comments

Comments
 (0)