{"action":"created","issue":{"url":"https://api.github.com/repos/visionmedia/supertest/issues/371","repository_url":"https://api.github.com/repos/visionmedia/supertest","labels_url":"https://api.github.com/repos/visionmedia/supertest/issues/371/labels{/name}","comments_url":"https://api.github.com/repos/visionmedia/supertest/issues/371/comments","events_url":"https://api.github.com/repos/visionmedia/supertest/issues/371/events","html_url":"https://github.com/visionmedia/supertest/pull/371","id":174345671,"number":371,"title":"fix request with content-length > 0 and content-encoding: gzip","user":{"login":"seangarner","id":1780230,"avatar_url":"https://avatars.githubusercontent.com/u/1780230?v=3","gravatar_id":"","url":"https://api.github.com/users/seangarner","html_url":"https://github.com/seangarner","followers_url":"https://api.github.com/users/seangarner/followers","following_url":"https://api.github.com/users/seangarner/following{/other_user}","gists_url":"https://api.github.com/users/seangarner/gists{/gist_id}","starred_url":"https://api.github.com/users/seangarner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seangarner/subscriptions","organizations_url":"https://api.github.com/users/seangarner/orgs","repos_url":"https://api.github.com/users/seangarner/repos","events_url":"https://api.github.com/users/seangarner/events{/privacy}","received_events_url":"https://api.github.com/users/seangarner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-31T18:34:46Z","updated_at":"2016-08-31T22:36:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/visionmedia/supertest/pulls/371","html_url":"https://github.com/visionmedia/supertest/pull/371","diff_url":"https://github.com/visionmedia/supertest/pull/371.diff","patch_url":"https://github.com/visionmedia/supertest/pull/371.patch"},"body":"The `Test` class wasn't constructing the `Request` instance with an uppercase method as it expects (e.g. [here](https://github.com/dynamicaction/superagent/blob/8d14c32dc3eacaaabc6457085ed8748075bc0ee7/lib/node/index.js#L417), [here](https://github.com/dynamicaction/superagent/blob/8d14c32dc3eacaaabc6457085ed8748075bc0ee7/lib/node/index.js#L136) and [here](https://github.com/dynamicaction/superagent/blob/8d14c32dc3eacaaabc6457085ed8748075bc0ee7/lib/node/index.js#L524)).\r\n\r\nThis results in a number of edge case bugs including on node 6 when a HEAD response has a `content-encoding` response of `gzip` and there is also a `content-length` > 0.  superagent would callback `Error: unexpected end of file`.  Superagent correctly interprets the [http spec](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13) by ignoring the content-length  and response body of a `HEAD` request."},"comment":{"url":"https://api.github.com/repos/visionmedia/supertest/issues/comments/243923865","html_url":"https://github.com/visionmedia/supertest/pull/371#issuecomment-243923865","issue_url":"https://api.github.com/repos/visionmedia/supertest/issues/371","id":243923865,"user":{"login":"seangarner","id":1780230,"avatar_url":"https://avatars.githubusercontent.com/u/1780230?v=3","gravatar_id":"","url":"https://api.github.com/users/seangarner","html_url":"https://github.com/seangarner","followers_url":"https://api.github.com/users/seangarner/followers","following_url":"https://api.github.com/users/seangarner/following{/other_user}","gists_url":"https://api.github.com/users/seangarner/gists{/gist_id}","starred_url":"https://api.github.com/users/seangarner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seangarner/subscriptions","organizations_url":"https://api.github.com/users/seangarner/orgs","repos_url":"https://api.github.com/users/seangarner/repos","events_url":"https://api.github.com/users/seangarner/events{/privacy}","received_events_url":"https://api.github.com/users/seangarner/received_events","type":"User","site_admin":false},"created_at":"2016-08-31T22:36:37Z","updated_at":"2016-08-31T22:36:37Z","body":"Then maybe supertest needs to expose uppercase methods for GET, HEAD, POST,\netc?\n\nOn Wed, 31 Aug 2016, 21:50 Kornel, <notifications@github.com> wrote:\n\n> Oh. Technically, methods are case-sensitive:\n>\n> http://httpwg.org/specs/rfc7231.html#method.overview\n>\n> The method token is case-sensitive because it might be used as a gateway\n> to object-based systems with case-sensitive method names.\n>\n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/visionmedia/supertest/pull/371#issuecomment-243896905>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/ABsqBq7WtbY5ohi0yEW1L19PJX1Btl54ks5qlekFgaJpZM4Jx7E->\n> .\n>\n"}}
{"actor":{"display_login":"seangarner"}}