Project: titanium
Issue TIMOB-23339: Android http client sets the Content Type header on all requests verbs, causing some servers to time out when expecting a request body 
This is a bug found when attempting to connect to a backend running Hunchentoot (Clisp web server), and the CLisp web framework Lucerne. Most other application servers I have experience with wouldn't mind, but this server expects to parse a request body when the Content Type is set. The Android http client, contrary to the iOS one, sets the content type not only on Post/Put/Patch as per the documentation, but actually on all http verbs. The issue can be easily fixed by changing : {code:java} if (parts.size() > 0 && needMultipart) {	boundary = HttpUrlConnectionUtils.generateBoundary();	client.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + boundary);	} else {	client.setRequestProperty("Content-Type","application/x-www-form-urlencoded");	} {code} to {code:java} if (parts.size() > 0 && needMultipart) {	boundary = HttpUrlConnectionUtils.generateBoundary();	client.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + boundary);	} else if (isPostOrPutOrPatch){	client.setRequestProperty("Content-Type","application/x-www-form-urlencoded");	} {code} on itanium_mobile/android/modules/network/src/java/ti/modules/titanium/network/TiHTTPClient.java I could send a pull request if you want. Cheers Richard
Story points: 2