2014-02-13 70 views
0

當外部客戶端通過curl將一個zip文件上傳到我的應用程序時,我有一個場景。該應用程序位於使用代理傳遞的Apache後面的jboss服務器上。用Apache代理通過curl上傳

因此請求是這樣的:

捲曲POST - >阿帕奇(代理傳遞) - > Jboss的(一些servlet的listneing)

上傳不會發生,它看起來它在Apache中停止我得到的錯誤日誌中的錯誤。

(70007)The timeout specified has expired: proxy: error reading status line from remote server 10.31.1.52 
proxy: Error reading from remote server returned by /Import.do 

捲曲上傳看起來是這樣的:

curl.exe --insecure -o IMPORT_RESP.XML -F [email protected]:\temp\file_to_upload\1392209753981_pb4Mp.zip -F un=username -F pw=password https://my.url.com/Import.do 

虛擬主機配置是:

<VirtualHost 10.31.127.254:443> 

SSLEngine on 
SSLProtocol all -SSLv2 
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW 

SSLCertificateFile /etc/pki/tls/certs/4pm.si_wildcard.crt 
SSLCertificateKeyFile /etc/pki/tls/private/4pm.si_wildcard.key 
SSLCACertificateFile /etc/pki/tls/certs/ca_cert_bundle.crt 

AddDefaultCharset utf-8 

SetEnvIf User-Agent ".*MSIE.*" \ 
    nokeepalive ssl-unclean-shutdown \ 
    downgrade-1.0 force-response-1.0 

#ProxyPreserveHost On 
ProxyPass/http://10.31.1.52:8080/ retry=0 
ProxyPassReverse/http://10.31.1.52:8080/ 

ServerName my.url.com 

LogLevel debug 
ErrorLog /var/log/httpd/4pm/my.url.com-error.log 
CustomLog /var/log/httpd/4pm/my.url.com-access.log combined 

</VirtualHost> 

回答

0

通過使用此參數--max-time爲(可能)您上傳增加你的捲曲的執行時間一個大文件。對於示例600秒:

--max-time 600 

如果問題不解決,那麼也儘量加大執行時間爲您Import.do(可能是在阿帕奇/ HTTP)