{"action":"closed","issue":{"number":16,"created_at":"2011-07-07T13:20:03Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"I just encountered a problem where I got unexpected results from CouchDB, in this case a 400 (Bad request) status. The following buffer is written to the socket:\r\n\r\n    GET /<dbname>/120f94089d36178e5768cda17e00b938 HTTP/1.0\r\n    Host: localhost:5984\r\n    User-Agent: Sag/0.6\r\n    Connection: Keep-Alive\r\n    Authorization: Basic Og==\r\n    Content-Type: application/json\r\n    \r\n    \r\nWhen I copy/paste this in a telnet session, the database responds with a normal 200 status, so the request itself is good. I've done some debugging, and when I don't use the connection pool (ie: always create a new socket), it works fine. So I suspect at a certain point, a socket is used that is not valid anymore somehow. Unfortunately I don't know how to determine this.\r\n\r\nThe response headers:\r\n\r\n    HTTP/1.1 400 Bad Request\r\n    Server: MochiWeb/1.0 (Any of you quaids got a smint?)\r\n    Date: Thu, 07 Jul 2011 13:13:27 GMT\r\n    Content-Length: 0\r\n \r\n\r\nI'm using the latest version of Sag (upgraded it this week), PHP 5.3.6, and CouchDB 1.1.0","comments":15,"title":"Connection pool sometimes gives invalid socket","updated_at":"2011-10-10T16:56:20Z","url":"https://api.github.com/repos/sbisbee/sag/issues/16","id":1182029,"assignee":{"avatar_url":"https://secure.gravatar.com/avatar/b30a32a1885743a2c8ad6538ef1fb550?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/sbisbee","id":81002,"login":"sbisbee"},"milestone":null,"closed_at":"2011-10-10T16:56:20Z","user":{"avatar_url":"https://secure.gravatar.com/avatar/a30e6e0aae646e16c2766d1389245f66?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/pkruithof","id":330828,"login":"pkruithof"},"html_url":"https://github.com/sbisbee/sag/issues/16","labels":[{"name":"bug","url":"https://api.github.com/repos/sbisbee/sag/labels/bug","color":"e10c02"}],"state":"closed"},"legacy":{"number":16,"action":"closed","issue":1182029}}