ruby - Am I doing it wrong or is it a bug in net/http? -
i'm using ruby net::http under nginx/phusion passenger server, attempting post json string server. appears post, when sending 'application/json', prematurely closes session server. i.e.: on server side: 127.0.0.1 - - [03/sep/2013 07:47:14] "post /path/to/submit " 200 45 0.0013 pid=12893 thr=47197563169088 file=ext/nginx/helperagent.cpp:933 time=2013-09-03 07:47:14.830 ]: uncaught exception in passengerserver client thread: exception: cannot read response backend process: connection reset peer (104) backtrace: in 'void client::forwardresponse(passenger::sessionptr&, passenger::filedescriptor&, const passenger::analyticslogptr&)' (helperagent.cpp:698) in 'void client::handlerequest(passenger::filedescriptor&)' (helperagent.cpp:859) in 'void client::threadmain()' (helperagent.cpp:952) a client side debug session is: opening connection hostname.com... opened <- "post /path/to/submit http/1.1\r\ncontent-typ...