Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Content length already present error soapUI 4.5.1

I've recently started using soapUI 4.5.1 and I'm still not familiar with all the settings. I've set up a few web requests and all but one are working correctly. I'm trying to send content of type application/xml but I'm getting:

org.apache.http.client.ClientProtocolException caused by org.apache.http.ProtocolException: Content-Length header already present.

The same request always worked fine for me in 4.5.0. Content of request is something like this:

POST http://exampleHost.com/exampleRequest HTTP/1.1
Accept-Encoding: gzip,deflate
Accept: text/xml
Content-Type: application/xml
Content-Length: 456
Host: exampleHost.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

Followed by the xml.

I take it that content length is sent twice, but I don't know where, because I haven't set it anywhere. SoapUI is showing Additional HTTP Headers for this message as 0.

Any pointers would be great!

like image 358
user1088166 Avatar asked Jul 02 '12 16:07

user1088166


2 Answers

I got the error to go away (in SoapUI 4.5.1) by checking the Authenticate Preemptively flag in

Preferences -> HTTP Settings -> Authenticate Preemptively

like image 149
CroesusKall Avatar answered Oct 13 '22 22:10

CroesusKall


I got in touch with SmartBear support, the problem seems to have been fixed in the latest nightly build available @ http://soapui.org/Downloads/soapui-pro-nightly-builds.html.

like image 27
oblomov Avatar answered Oct 13 '22 22:10

oblomov