Ian McCoy
unread,Apr 1, 2013, 11:54:31 AM4/1/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sardi...@googlegroups.com
Hi,
I'm using sardine on an embedded device to load files to a remote
server. One of the constraints I have is memory. I am able to upload
files using the put method, which takes a byte[], but some of the files I
need to upload exceed my memory. It would be really helpful to get put method, which takes a InputStream, working.
When I call this method (Here is my call..... sardine.put(String URL, InputStream is), I get the following error:
Exception in thread "main" com.googlecode.sardine.impl.SardineException: Unexpected response (411 Length Required)
at com.googlecode.sardine.impl.handler.ValidatingResponseHandler.validateResponse(ValidatingResponseHandler.java:49)
at com.googlecode.sardine.impl.handler.VoidResponseHandler.handleResponse(VoidResponseHandler.java:35)
at com.googlecode.sardine.impl.handler.VoidResponseHandler.handleResponse(VoidResponseHandler.java:30)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:945)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:919)
at com.googlecode.sardine.impl.SardineImpl.execute(SardineImpl.java:691)
at com.googlecode.sardine.impl.SardineImpl.put(SardineImpl.java:602)
at com.googlecode.sardine.impl.SardineImpl.put(SardineImpl.java:579)
at com.googlecode.sardine.impl.SardineImpl.put(SardineImpl.java:546)
at com.googlecode.sardine.impl.SardineImpl.put(SardineImpl.java:535)
at com.googlecode.sardine.impl.SardineImpl.put(SardineImpl.java:526)
at webdavtest.WebDavTest.main(WebDavTest.java:143)
Java Result: 1
Any help troubleshooting the error would be appreciated.
Regards,
Ian