I have an app here that sends out an HTTP PUT to a webserver. The code looks like this:
URL url = new URL(urlStr + "?" + encodedParameters);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("PUT");
connection.setRequestProperty("Content-Length", "0");
When I try this on Android 2.1, I end up getting back a 411 error ("Length Required").
On Android 2.3.3 and up I was getting this same 411 error back until I added that last "Content-Length" property. But it's still happening on Android 2.1.
Anyone have an idea what might be going on here?