{"action":"closed","issue":{"url":"https://api.github.com/repos/phusion/passenger/issues/1565","repository_url":"https://api.github.com/repos/phusion/passenger","labels_url":"https://api.github.com/repos/phusion/passenger/issues/1565/labels{/name}","comments_url":"https://api.github.com/repos/phusion/passenger/issues/1565/comments","events_url":"https://api.github.com/repos/phusion/passenger/issues/1565/events","html_url":"https://github.com/phusion/passenger/issues/1565","id":95863769,"number":1565,"title":"Bad Gateway when \"LOCATION\" called","user":{"login":"Wasaabi404","id":13398143,"avatar_url":"https://avatars.githubusercontent.com/u/13398143?v=3","gravatar_id":"","url":"https://api.github.com/users/Wasaabi404","html_url":"https://github.com/Wasaabi404","followers_url":"https://api.github.com/users/Wasaabi404/followers","following_url":"https://api.github.com/users/Wasaabi404/following{/other_user}","gists_url":"https://api.github.com/users/Wasaabi404/gists{/gist_id}","starred_url":"https://api.github.com/users/Wasaabi404/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wasaabi404/subscriptions","organizations_url":"https://api.github.com/users/Wasaabi404/orgs","repos_url":"https://api.github.com/users/Wasaabi404/repos","events_url":"https://api.github.com/users/Wasaabi404/events{/privacy}","received_events_url":"https://api.github.com/users/Wasaabi404/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/phusion/passenger/labels/CannotReproduce","name":"CannotReproduce","color":"bfd4f2"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-18T22:10:17Z","updated_at":"2016-02-05T13:01:56Z","closed_at":"2016-02-05T13:01:56Z","body":"What steps will reproduce the problem?\r\n1. used on a login script that once \"authenticated\" tries to redirect to another place\r\n\r\nWhat is the expected output? What do you see instead?\r\nExpected output is the main screen after login.\r\nWhat I get is \"BAD GATEWAY\":\r\ncode: `<h1>Bad Gateway</h1>`\r\n\r\nWhat version of Phusion Passenger are you using? Which version of Rails? On\r\nwhat operating system?\r\nPhusion Passenger: passenger-5.0.14\r\nNot rails - Straight ruby: 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]\r\nCentOS release 6.4 (Final)\r\n\r\n\r\nPlease provide any additional information below.\r\n\r\nhere is the log:\r\n\r\n    [ 2015-07-18 14:05:15.0541 15560/7ffae29427e0 apa/Hooks.cpp:275 ]: File descriptor opened: 20\r\n    [ 2015-07-18 14:05:15.0543 15533/7f1bd2401700 age/Cor/Req/TurboCaching.h:242 ]: Clearing turbocache\r\n    [ 2015-07-18 14:05:15.0544 15533/7f1bd2401700 Ser/Server.h:241 ]: [ServerThr.1] New clients can be accepted on a server socket\r\n    [ 2015-07-18 14:05:15.0545 15533/7f1bd2401700 Ser/Server.h:261 ]: File descriptor purpose: 34: Server ServerThr.1, client 1-2\r\n    [ 2015-07-18 14:05:15.0546 15533/7f1bd2401700 Ser/Server.h:267 ]: [ServerThr.1] 1 new client(s) accepted; there are now 1 active client(s)\r\n    [ 2015-07-18 14:05:15.0550 15533/7f1bd2401700 App/Gro/SessionManagement.cpp:329 ]: Session checked out from process (pid=15614, group=/data/www/masterplans.com/maps)\r\n    [ 2015-07-18 14:05:15.0551 15533/7f1bd2401700 age/Cor/Req/CheckoutSession.cpp:114 ]: [Client 1-2] Session checked out: pid=15614, gupid=16d8331-OOi3gaopPH\r\n    [ 2015-07-18 14:05:15.0551 15533/7f1bd2401700 age/Cor/Req/CheckoutSession.cpp:182 ]: [Client 1-2] Session initiated: fd=38\r\n    [ 2015-07-18 14:05:15.0670 15533/7f1bd2401700 age/Cor/Req/ForwardResponse.cpp:100 ]:     [Client 1-2] Error parsing application response header: strict mode assertion failed\r\n    [ 2015-07-18 14:05:15.0672 15533/7f1bd2401700 App/Socket.h:68 ]: File descriptor closed: 38\r\n    [ 2015-07-18 14:05:15.0672 15533/7f1bd2401700 Ser/Server.h:909 ]: File descriptor closed: 34\r\n    [ 2015-07-18 14:05:15.0675 15560/7ffae29427e0 FileDescriptor.h:83 ]: File descriptor closed: 20\r\n\r\nthe line that is reported at \"log level 1\" is:\r\n\r\n    [ 2015-07-18 14:05:15.0670 15533/7f1bd2401700 age/Cor/Req/ForwardResponse.cpp:100 ]: [Client 1-2] Error parsing application response header: strict mode assertion failed\r\n\r\nit happens when the following lines are called:\r\n\r\n    self.headers['Location'] = \"/#{page}\"\r\n    self.headers['Location'] << \"?#{gets}\" if gets\r\n\r\n"}}