curl-users
curl damages form data if read from stdin
Date: Thu, 16 Jul 2009 16:05:12 +0200
Hello,
I observe the following strange behavior: When form data is passed via stdin, a full-stop '.' is appended. This did not happen in a previous version. Hard to track down if you pass the password this way.
$ echo foontastic | curl --trace-ascii /tmp/trace -o /tmp/response -F 'foo=<-' -F 'bar=barracuda' [url removed]
$ cat /tmp/trace
[...]
00d4: Content-Type: multipart/form-data; boundary=--------------------
0114: --------6fff571500e0
012a:
<= Recv header, 23 bytes (0x17)
0000: HTTP/1.1 100 Continue
=> Send data, 250 bytes (0xfa)
0000: ------------------------------6fff571500e0
002c: Content-Disposition: form-data; name="foo"
0058:
005a: foontastic.
0067: ------------------------------6fff571500e0
0093: Content-Disposition: form-data; name="bar"
00bf:
00c1: barracuda
00cc: ------------------------------6fff571500e0--
[...]
Note the full-stop following 'foontastic' in the line marked '005a'. No such thinghappens for the 'barracuda' in line '00c1'.
Is this a bug?
By te way:
$ curl --version
curl 7.18.2 (x86_64-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15 libssh2/1.0
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
Thank you!
Stefan
-- Stefan Klinger o/klettern /\/ bis zum send plaintext only - max size 32kB - no spam \ Abfallen http://stefan-klinger.de ------------------------------------------------------------------- List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users FAQ: http://curl.haxx.se/docs/faq.html Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2009-07-16