cch1 / http.async.client

Async Http Client - Clojure
http://cch1.github.com/http.async.client
267 stars 40 forks source link

If you POST without a :body, the client hangs #21

Closed sbowman closed 12 years ago

sbowman commented 13 years ago

If you try to submit a POST request without any :body map or a string, the request will hang and never return.

sbowman commented 13 years ago

Similar thing happens with PUT, but instead of hanging, I think the submission to the server is incorrect. I haven't investigated too much, but if I PUT to a Rails 2.3 app without a body, I receive:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<HTML>
  <HEAD><TITLE>Length Required</TITLE></HEAD>
  <BODY>
    <H1>Length Required</H1>
    WEBrick::HTTPStatus::LengthRequired
    <HR>
    <ADDRESS>
     WEBrick/1.3.1 (Ruby/1.8.7/2011-07-07) at
     localhost:8080
    </ADDRESS>
  </BODY>
</HTML>
sbowman commented 13 years ago

If I add a dummy body in both cases, the call will work. That's my current work-around.

sbowman commented 13 years ago

With a litte more investigation, I think the PUT problem is a Rails issue.

neotyk commented 12 years ago

Hi Sean,

Thanks for bug report. I failed to reproduce this issue: https://github.com/neotyk/http.async.client/commit/146b1916c050f957360c39a3488c9e499a4898b5

Both POST and PUT are not hanging when issued w/o body. Please see: test-post-no-body and test-put-no-body.

Please let me know if you still think it is http.async.client issue.

neotyk commented 12 years ago

Can't reproduce