It turns out this is because my warmupInput file was empty. The server responded with 100 (continue), but because the file was empty nothing was written to the output stream, so after a while there was a timeout.

IMHO, this is a bug. Either an empty input should be posted, or I should get a more accurate error ("nothing to post")

Ittay

Ittay Dror wrote:
Hello

I'm trying to send a POST request to "http://localhost:8090/my/path";, and getting the exception in the subject.

The request goes to a the same process.
The servlet handling requests is jersey's ServletContainer.
Requests from an external tool (both to http://localhost:8090/my/path and http://localhost:8090) are fine.
Putting a breakpoint in the servlet shows it is not called

I create the request like:
      var httpClient = new DefaultHttpClient

      var httpPost = new HttpPost((new URL(base, requestUrl)).toString)
      httpPost.addHeader("Content-Type", "text/raw")
httpPost.setEntity(new InputStreamEntity(warmupInput.openStream, -1))
      var response = httpClient.execute(httpPost)

What can be the problem?

Regards,
Ittay

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to