mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
http: only recognize application/x-www-form-urlencoded in ParseForm
R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/5322070
This commit is contained in:
parent
54049767ae
commit
a494c20032
2 changed files with 7 additions and 14 deletions
|
|
@ -734,7 +734,7 @@ func (r *Request) ParseForm() (err error) {
|
|||
ct := r.Header.Get("Content-Type")
|
||||
ct, _, err := mime.ParseMediaType(ct)
|
||||
switch {
|
||||
case ct == "text/plain" || ct == "application/x-www-form-urlencoded" || ct == "":
|
||||
case ct == "application/x-www-form-urlencoded":
|
||||
var reader io.Reader = r.Body
|
||||
maxFormSize := int64(1<<63 - 1)
|
||||
if _, ok := r.Body.(*maxBytesReader); !ok {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue