Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
x/net/http2: under load, Go GCS library or http2 sends bad MIME, gets 400 response with body: "Invalid multipart request with 0 mime parts" #30693
What version of Go are you using (
Thanks for the email. I extracted out one of the failures from the 163M log.
Looks like the boundary delimiter is declared to be
I'm not sure what's causing that, though.
It looks like the code responsible for generating that multipart message is https://github.com/googleapis/google-api-go-client/blob/ed2534c57ed076df43af394869d83ac66b040e17/gensupport/media.go#L118 but I don't see anything wrong with that code.
As for Go 1.11 vs Go 1.12, I can't think of anything in mime/multipart, net/http, or x/net/http2 that would've changed behavior here. There was a629399 for mime/multipart but I don't see any quoted boundaries here anyway, and I don't think anybody is calling the mime/multipart.Writer.SetBoundary method anyway.
You're sure you're not able to reproduce it with Go 1.11 but are with Go 1.12?
Hopefully it's not a race within x/net/http2, sending the wrong headers from a different request. That'd scare & surprise me if so.
Can you try running it under the Go race detector and see if there are any errors? Your repro code looks fine.
changed the title
HTTP response code 400 with body: Invalid multipart request with 0 mime parts.
Mar 9, 2019
I think I see the issue, but I could be mistaken.