cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-2977499 ] HTTP POST from stdin does not work as expected

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Sat, 27 Mar 2010 10:25:24 +0000

Bugs item #2977499, was opened at 2010-03-27 10:25
Message generated for change (Tracker Item Submitted) made by zaarkov
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2977499&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: http
Group: wrong behaviour
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: zaarkov (zaarkov)
Assigned to: Daniel Stenberg (bagder)
Summary: HTTP POST from stdin does not work as expected

Initial Comment:
i'm trying to POST data from stdin via a pipe:
# some_command |curl --request POST --data - --url "http://server.example.com/post_handler"

the only thing that gets posed by this command is '-' instead of the whole stdin.
i know that a POST request requires to know and set the Content-Length in advance, so maybe there's a problem.
but even if i add the calculated length with --header "Content-Length: xxx" it sends nothing.

it would be ok, if curl buffers the whole stdin, calculates the conten-length and sends the request afterwards.

curl 7.19.6 (i686-pc-linux-gnu) libcurl/7.19.6 GnuTLS/2.8.5 zlib/1.2.3 libidn/1.15

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

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2977499&group_id=976
Received on 2010-03-27

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET