{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-js/issues/563","labels_url":"https://api.github.com/repos/swagger-api/swagger-js/issues/563/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-js/issues/563/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-js/issues/563/events","html_url":"https://github.com/swagger-api/swagger-js/issues/563","id":104669834,"number":563,"title":"Server replies with 411 Length Required","user":{"login":"zub2","id":1274975,"avatar_url":"https://avatars.githubusercontent.com/u/1274975?v=3","gravatar_id":"","url":"https://api.github.com/users/zub2","html_url":"https://github.com/zub2","followers_url":"https://api.github.com/users/zub2/followers","following_url":"https://api.github.com/users/zub2/following{/other_user}","gists_url":"https://api.github.com/users/zub2/gists{/gist_id}","starred_url":"https://api.github.com/users/zub2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zub2/subscriptions","organizations_url":"https://api.github.com/users/zub2/orgs","repos_url":"https://api.github.com/users/zub2/repos","events_url":"https://api.github.com/users/zub2/events{/privacy}","received_events_url":"https://api.github.com/users/zub2/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-03T11:14:44Z","updated_at":"2015-09-03T12:24:19Z","closed_at":"2015-09-03T12:24:19Z","body":"Im using swagger-js 2.1.3.\r\n\r\nI ran into a curious situation: When I call an API method generated by swagger-js, the server replies with HTTP status code 411 Length Required.\r\n\r\nReading the HTTP/1.1 spec (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.12) I see:\r\n\r\n> The server refuses to accept the request without a defined Content- Length. The client MAY repeat the request if it adds a valid Content-Length header field containing the length of the message-body in the request message.\r\n\r\nI don't know under what circumstances is the server allowed to reply with 411, but it seems like it can happen. For my application, a way to request that swagger-js includes Content-Length would suffice, but I don't know what would be a good solution that works for all users.\r\n\r\nCould swagger-js always include Content-Length?"},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-js/issues/comments/137420783","html_url":"https://github.com/swagger-api/swagger-js/issues/563#issuecomment-137420783","issue_url":"https://api.github.com/repos/swagger-api/swagger-js/issues/563","id":137420783,"user":{"login":"zub2","id":1274975,"avatar_url":"https://avatars.githubusercontent.com/u/1274975?v=3","gravatar_id":"","url":"https://api.github.com/users/zub2","html_url":"https://github.com/zub2","followers_url":"https://api.github.com/users/zub2/followers","following_url":"https://api.github.com/users/zub2/following{/other_user}","gists_url":"https://api.github.com/users/zub2/gists{/gist_id}","starred_url":"https://api.github.com/users/zub2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zub2/subscriptions","organizations_url":"https://api.github.com/users/zub2/orgs","repos_url":"https://api.github.com/users/zub2/repos","events_url":"https://api.github.com/users/zub2/events{/privacy}","received_events_url":"https://api.github.com/users/zub2/received_events","type":"User","site_admin":false},"created_at":"2015-09-03T12:24:19Z","updated_at":"2015-09-03T12:24:19Z","body":"M'kay... so I found it: https://stackoverflow.com/questions/17255556/http-headers-for-chunked-encoding-post-error-411?answertab=votes#answer-17256412 and as far as I can tell, it's mod_wsgi ignorind HTTP/1.1 spec and the behavior of node + swagger-js is correct.\r\nSorry for the noise."}}