Skip to content

Commit

Permalink
fix: send attachments without content-type (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
supervacuus committed Apr 2, 2024
1 parent 433ed68 commit de1f583
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions util/net/http_multipart_builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,15 @@ std::unique_ptr<HTTPBodyStream> HTTPMultipartBuilder::GetBodyStream() {
for (const auto& pair : file_attachments_) {
const FileAttachment& attachment = pair.second;
std::string header = GetFormDataBoundary(boundary_, pair.first);
#ifdef SENTRY_MODIFIED
header += base::StringPrintf("; filename=\"%s\"%s",
attachment.filename.c_str(), kCRLF);
header += base::StringPrintf("Content-Type: %s%s",
attachment.content_type.c_str(), kBoundaryCRLF);
#else
header += base::StringPrintf("; filename=\"%s\"%s",
attachment.filename.c_str(), kBoundaryCRLF);
#endif

streams.push_back(new StringHTTPBodyStream(header));
streams.push_back(new FileReaderHTTPBodyStream(attachment.reader));
Expand Down

0 comments on commit de1f583

Please sign in to comment.