title: File upload issue in phonegap with ssl
body: <p>We have image upload functionality in our app. This functionality works fine when we use HTTP but fails when SSL is enabled. After some online surfing I got some code i.e to add true attribute in upload method </p>
  
  <pre><code>ft.upload(fileuri, encodeURI(PublishUrl+"FileUpload"), win, fail, options,true);
  </code></pre>
  
  <p>but it didn't worked</p>
  
  <p>Error Log</p>
  
  <pre><code>07-11 19:44:40.651: E/FileTransfer(17526):    {"target":"Url","source":"file:\/\/\/storage\/emulated\/0\/PopImg\/cache\/Car\/Crazy_Racer\/sm_1_(10).jpg","http_status":0,"code":3}
  07-11 19:44:40.651: E/FileTransfer(17526): java.net.SocketException: Socket is closed
  07-11 19:44:40.651: E/FileTransfer(17526):            at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.checkOpen(OpenSSLSocketImpl.java:232)
  07-11 19:44:40.651: E/FileTransfer(17526):            at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:245)
  07-11 19:44:40.651: E/FileTransfer(17526):            at libcore.net.http.HttpConnection.setupSecureSocket(HttpConnection.java:209)
  07-11 19:44:40.651: E/FileTransfer(17526):            at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.makeSslConnection(HttpsURLConnectionImpl.java:478)
  07-11 19:44:40.651: E/FileTransfer(17526):            at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.connect(HttpsURLConnectionImpl.java:442)
  07-11 19:44:40.651: E/FileTransfer(17526):            at libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:290)
  07-11 19:44:40.651: E/FileTransfer(17526):            at libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:240)
  07-11 19:44:40.651: E/FileTransfer(17526):            at libcore.net.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:81)
  07-11 19:44:40.651: E/FileTransfer(17526):            at libcore.net.http.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:165)
  07-11 19:44:40.651: E/FileTransfer(17526):            at org.apache.cordova.FileTransfer$1.run(FileTransfer.java:344)
  07-11 19:44:40.651: E/FileTransfer(17526):            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
  07-11 19:44:40.651: E/FileTransfer(17526):            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
  07-11 19:44:40.651: E/FileTransfer(17526):            at java.lang.Thread.run(Thread.java:856)
  07-11 19:44:40.651: E/FileTransfer(17526): Failed after uploading 0 of 18171 bytes.
  </code></pre>
  
  <p>Any suggestion how to fix this ?</p>