-
Notifications
You must be signed in to change notification settings - Fork 18k
mime: ParseMedia fails to parse googleapis batch boundary #8532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
Google really sends that? That looks illegal. RFC 2045 says: content := "Content-Type" ":" type "/" subtype *(";" parameter) ; Matching of media type and subtype ; is ALWAYS case-insensitive. parameter := attribute "=" value attribute := token ; Matching of attributes ; is ALWAYS case-insensitive. value := token / quoted-string token := 1*<any (US-ASCII) CHAR except SPACE, CTLs, or tspecials> tspecials := "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / "\" / <"> "/" / "[" / "]" / "?" / "=" ; Must be in quoted-string, ; to use within parameter values So looking at the boundary part in your example above, it's not quoted, so it's not a quoted string, which means it must be a token. But a token excludes tspecials, and "=" is a tspecial. Hence, invalid. Please demonstrate how Google sends this and I'll try to kick somebody to fix it. Owner changed to @bradfitz. Status changed to WaitingForReply. |
Right, if google returned the boundary quoted, it would work fine: http://play.golang.org/p/ngT5gWKjWh Here's a short hackish example where I've included the response dump for when I run it: https://gist.github.com/sergiusens/7f75c3593710e1f40abc I used this as a guide https://developers.google.com/gmail/api/guides/batch |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by sergiusens:
The text was updated successfully, but these errors were encountered: