###前提・実現したいこと
Centos7.0を使用しています。
シェル上でcurlを使用してファイルサイズが10MB以上のファイルをPOSTしたいです。
###発生している問題・エラーメッセージ
コンソールにて実行時に以下のメッセージが表示されます。
HTTP/1.1 400 Bad Request Connection: close Content-Length: 0 Date: Tue, 28 Feb 2017 02:47:22 GMT
実行時に出力したログは以下となります。
<= Recv header, 26 bytes (0x1a) 0000: HTTP/1.1 400 Bad Request <= Recv header, 19 bytes (0x13) 0000: Connection: close <= Recv header, 19 bytes (0x13) 0000: Content-Length: 0 <= Recv header, 37 bytes (0x25) 0000: Date: Tue, 28 Feb 2017 02:47:22 GMT <= Recv header, 2 bytes (0x2) 0000: == Info: we are done reading and this is set to close, stop send == Info: Closing connection 0
###該当のソースコード
curl -i -X POST http://192.168.1.1/API/backup \ -H "authorization: AAA BBB " \ -F "backup={\"id\": \"$id\" };type=application/json" \ -F "file=@/tmp/backup.zip" -k \ --trace-ascii backup_log.txt
###試したこと
送るファイルのサイズを10MB以下にすると応答は200で正常に終了しました。
###curlのバージョン
curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.19.1 Basic ECC zlib/1.2.7 libidn/1.28 libssh2/1.4.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz
###確認したいこと
curlでPOSTする際には上限値が決まっているのでしょうか?
決まっている場合はそれを変更する方法を教えていただきたいです。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/02/28 06:49
2017/02/28 06:58