pstadler/candy-node — pull request #2 by posniewski (2012-11-07 01:34:00+00:00)
Title: Fixed HTTP 400 errors

This began as an issue under Candy: https://github.com/candy-chat/candy/issues/112

I was able to get Candy to work with ejabberd via Apache, but it didn't work with candy-node. Some investigation showed that the original request headers weren't being forwarded to the BOSH server. I added them and it started responding.

I then I found candy would hang during validation, and saw that the proxy response never seemed to complete. This was caused by a typo in the proxying code; it was waiting for the request to end, not the response.