Curl不会将大于1 MB的文件发送到API REST

时间:2017-03-27 15:40:31

标签: rest curl

我正在尝试使用curl作为rest客户端在glassfish中部署web。

我使用此命令

curl -v --progress-bar --user USER:PASSWORD --insecure -H "Accept: application/json" -H "Content-Type: multipart/form-data"   -H "X-Requested-By: dummy"  -X POST -F id=@myfile.war -F contextroot=/ -F  name=pepe -F virtualservers=pepe  -F force=true  --ssl https://myserver.com:4848/management/domain/applications/deploy 

但卷曲永远不会完成。

*   Trying 137.74.175.89...
* TCP_NODELAY set
* Connected to myserver.com (137.74.175.89) port 4848 (#0)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: none
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Request CERT (13):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Certificate (11):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
*  subject: C=US; ST=California; L=Santa Clara; O=Oracle Corporation; OU=GlassFish; CN=localhost
*  start date: Aug 21 13:30:10 2014 GMT
*  expire date: Aug 18 13:30:10 2024 GMT
*  issuer: C=US; ST=California; L=Santa Clara; O=Oracle Corporation; OU=GlassFish; CN=localhost
*  SSL certificate verify result: self signed certificate (18), continuing anyway.
* Server auth using Basic with user 'user'
> POST /management/domain/applications/deploy HTTP/1.1
> Host: wiseecloud.com:4848
> Authorization: Basic asdfadfadfadfadf
> User-Agent: curl/7.53.1
> Accept: application/json
> X-Requested-By: dummy
> Content-Length: 47795492
> Expect: 100-continue
> Content-Type: multipart/form-data; boundary=------------------------0eba8ac6bbc229b3
> 
< HTTP/1.1 100 Continue
* TLSv1.2 (IN), TLS handshake, Hello request (0):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):

我看到我的服务器发送的数据并没有发送任何内容。

我尝试使用小文件(&lt; 1MB)并且可以使用,但不能使用“大”文件

0 个答案:

没有答案