Skip to content

Commit

Permalink
transport: fix Content-Type for pprof data
Browse files Browse the repository at this point in the history
Oops, copy-pasta.
  • Loading branch information
axw committed Nov 25, 2019
1 parent 545a860 commit d39ebd6
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 d39ebd6

Please sign in to comment.