Welcome! Log In Create A New Profile

Advanced

upstream sent invalid header while reading response

Posted by OrNix 
upstream sent invalid header while reading response
June 17, 2015 05:31AM
Hello. I've got backend (fapws python server).
There is a problem when backend sets field expires= in Set-Cookie

2015/06/17 08:59:22 [debug] 27687#0: *8 http proxy header: "Date: Wed, 17 Jun 2015 05:59:22 GMT"
2015/06/17 08:59:22 [debug] 27687#0: *8 http proxy header: "P3P: CP="NOI ADM DEV COM NAV OUR STP""
2015/06/17 08:59:22 [debug] 27687#0: *8 http proxy header: "Content-type: text/html"
2015/06/17 08:59:22 [debug] 27687#0: *8 http proxy header: "Server: fapws3/0.11"
2015/06/17 08:59:22 [debug] 27687#0: *8 http proxy header: "Set-Cookie: sid=50158736; Domain=.domain.ru; expires=Thu, 02-Jul-2015 05:59:22 GMT; Path=/"
2015/06/17 08:59:22 [error] 27687#0: *8 upstream sent invalid header while reading response header from upstream, client: 217.15.199.73, server: t.domain.ru, request: "GET /557/1434520761446.js HTTP/1.1", upstream: "http://127.0.0.1:8802/557/1434520761446.js", host: "t.domain.ru", referrer: "http://film4ik.ru/"

If there is no expires= in Set-Cookie, all is OK:
2015/06/17 09:04:53 [debug] 30261#0: *160310 http proxy header: "Date: Wed, 17 Jun 2015 06:04:53 GMT"
2015/06/17 09:04:53 [debug] 30261#0: *160310 http proxy header: "P3P: CP="NOI ADM DEV COM NAV OUR STP""
2015/06/17 09:04:53 [debug] 30261#0: *160310 http proxy header: "Content-type: text/html"
2015/06/17 09:04:53 [debug] 30261#0: *160310 http proxy header: "Server: fapws3/0.11"
2015/06/17 09:04:53 [debug] 30261#0: *160310 http proxy header: "Set-Cookie: sid=50175274; Domain=.domain.ru; Path=/"
2015/06/17 09:04:53 [debug] 30261#0: *160310 http proxy header done

Format expires "Thu, 02-Jul-2015 05:59:22 GMT" is valid, we've looked in RFC. What can be a reason of the issue?



Edited 1 time(s). Last edit at 06/17/2015 05:40AM by OrNix.
Re: upstream sent invalid header while reading response
June 17, 2015 08:50AM
The reason was in year format. 15 works, 2015 does not work.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 164
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready