Closed jarmo closed 9 years ago
spdycat does not support multipart uploading at the moment. It just upload the content of the given file. The workaround is create multipart data in advance in a file and upload it with -d option.
Thanks! This works.
However, i cannot seem to use stdin as a file like this:
gzip -c foo.bar | ./spdycat --data - https://server.com
It does send something with content-length of 0 if use -
as an input.
This is a bug. --data -
works with file only. We have a similar fix for nghttp client (https://github.com/tatsuhiro-t/nghttp2/commit/a8a66843db98377398edf6f65d3dabe35e82b98f) and can port here.
Fix committed via 6c17426
Thanks! Using -
for stdin works now! I'm gonna close this issue, although multipart uploads are not supported, but i've managed to just upload the content of the file.
I'm trying to upload a file using multipart request, but not able to do that with
spdycat
.Here's how i'm uploading file with
curl
:curl -X POST -F "file=@my-file" https://example.com/upload
This is how i tried it with
spdycat
:spdycat --data my-file https://example.com/upload
It does not seem to work as
nginx
withspdy
module returns withhttp 400
and in logs i can see thatContent-Type
header is missing.What am i doing wrong and how to achieve file upload similar to
curl
?