]> Cypherpunks repositories - gostls13.git/commit
mime/multipart: allow boundary len <= 70
authorPatrick Pelletier <pp.pelletier@gmail.com>
Thu, 26 Jan 2017 06:09:26 +0000 (22:09 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 1 Feb 2017 21:06:49 +0000 (21:06 +0000)
commit1ef3a77e182b322eaaaf767eb176a093f5f68282
treea995cf95acf37871454eb9b99a492add2d28de41
parentec4062f8eab9ce771d0ecece5b5388f960498606
mime/multipart: allow boundary len <= 70

As per RFC 2046, the boundary for multipart MIME is allowed up to 70
characters. The old SetBoundary implementation only allowed up to 69 so
this bumps it to the correct value of 70.

The relevant RFC is at https://www.ietf.org/rfc/rfc2046.txt and section
5.1.1 defines the boundary specification.

Fixes #18793

Change-Id: I91d2ed4549c3d27d6049cb473bac680a750fb520
Reviewed-on: https://go-review.googlesource.com/35830
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/mime/multipart/writer.go
src/mime/multipart/writer_test.go