Skip to content

Commit

Permalink
Merge pull request #679 from axw/transport-pprof-content-type
Browse files Browse the repository at this point in the history
transport: fix Content-Type for pprof data
  • Loading branch information
axw committed Nov 25, 2019
2 parents 545a860 + d39ebd6 commit b3866e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion transport/http.go
Expand Up @@ -307,7 +307,7 @@ func (t *HTTPTransport) SendProfile(
for _, profileReader := range profileReaders {
h = make(textproto.MIMEHeader)
h.Set("Content-Disposition", fmt.Sprintf(`form-data; name="profile"`))
h.Set("Content-Type", "application/x-protobuf; messageType=perftools.profiles.Profile")
h.Set("Content-Type", `application/x-protobuf; messageType="perftools.profiles.Profile"`)
part, err = w.CreatePart(h)
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions transport/http_test.go
Expand Up @@ -555,14 +555,14 @@ func TestHTTPTransportSendProfile(t *testing.T) {
formName: "profile",
header: makeHeader(
"Content-Disposition", `form-data; name="profile"`,
"Content-Type", "application/x-protobuf; messageType=perftools.profiles.Profile",
"Content-Type", `application/x-protobuf; messageType="perftools.profiles.Profile"`,
),
content: "profile1",
}, {
formName: "profile",
header: makeHeader(
"Content-Disposition", `form-data; name="profile"`,
"Content-Type", "application/x-protobuf; messageType=perftools.profiles.Profile",
"Content-Type", `application/x-protobuf; messageType="perftools.profiles.Profile"`,
),
content: "profile2",
}},
Expand Down

0 comments on commit b3866e6

Please sign in to comment.