cURL / Mailing Lists / curl-users / Single Mail

curl-users

[ curl-Bugs-436035 ] Post fields names can contain spaces

From: <noreply_at_sourceforge.net>
Date: Mon, 25 Jun 2001 02:27:58 -0700

Bugs item #436035, was opened at 2001-06-25 02:27
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=100976&aid=436035&group_id=976

Category: libcurl
Group: wrong behaviour
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Daniel Stenberg (bagder)
Summary: Post fields names can contain spaces

Initial Comment:
I worked around this problem and found, that if post
field name contain spaces then It truncate to first
space and add into request with wrong name. I made in
scource next changes for fix it. In file formdata.c in
function int FormParse(char *input,
              struct HttpPost **httppost,
              struct HttpPost **last_post)

I changed string

  if(1 <= sscanf(input, "%255[^ =] = %4095[^\n]",
name, contents)) {

to

  if(1 <= sscanf(input, "%255[^=]=%4095[^\n]", name,
contents)) {

Just cut spaces from regular mask of sscanf and after
it all work right. Please commit this into CVS tree.

Anton Kalmykov
anton_at_concord.ru

Thanks.

----------------------------------------------------------------------

You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=100976&aid=436035&group_id=976
Received on 2001-06-25