Skip to content
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

http.FormValue segfaults on multipart/form-data requests #233

Closed
gopherbot opened this issue Nov 16, 2009 · 4 comments
Closed

http.FormValue segfaults on multipart/form-data requests #233

gopherbot opened this issue Nov 16, 2009 · 4 comments

Comments

@gopherbot
Copy link
Contributor

by suraci.alex:

Before filing a bug, please check whether it has been fixed since
the latest release: run "hg pull -u" and retry what you did to
reproduce the problem.  Thanks.

What steps will reproduce the problem?
1. Code up a script that just handles "/" with a function that will dump 
the form value for "foo". (Reproduce case attached.)
2. Run the server.
3. curl -F "foo=bar" <url>

What is the expected output? What do you see instead?
"bar" from the server.
Instead: a long pause, followed by the attached crash dump.


What is your $GOOS?  $GOARCH?
GOOS=linux
GOARCH=amd64


Which revision are you sync'ed to?  (hg log -l 1)
changeset:   4038:dea3d2ff5792
tag:         tip
user:        Russ Cox <rsc@golang.org>
date:        Sat Nov 14 10:28:53 2009 -0800
summary:     typos


Please provide any additional information below.
curl -d "foo=bar" <url> works as expected.

Also, a side-by-side comparison of a form submission with Chrome and with 
Curl can be found here if any additional info is needed: 
http://paste.pocoo.org/show/oKlQVnbCe6wqVrgroO6m/

Attachments:

  1. testcase.go (307 bytes)
  2. output.txt (3461 bytes)
@gopherbot
Copy link
Contributor Author

Comment 1 by suraci.alex:

Just did a hg update, still happens.

@rsc
Copy link
Contributor

rsc commented Nov 17, 2009

Comment 3:

Owner changed to r...@golang.org.

Status changed to Accepted.

@griesemer
Copy link
Contributor

Comment 4:

This is a known TODO in the code (http/request.go:634).
On a related note: Request method FormValue, line 649: Should check for r.Form != nil in
any case to avoid the 
crash in case of errors returned from r.ParseForm.

@rsc
Copy link
Contributor

rsc commented Nov 17, 2009

Comment 5:

This issue was closed by revision 849e6f9.

Status changed to Fixed.

Merged into issue #-.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc removed their assignment Jun 22, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants