Welcome! Log In Create A New Profile

Advanced

Content-Length compared to actual size before caching

March 09, 2012 07:14PM
If my upstream goes away I get an error

upstream prematurely closed connection while reading response header from upstream

or

recv() failed (104: Connection reset by peer) while reading response header from upstream

unfortunately, this still gives me a 200 code and this return is entered incomplete into my memcache. Is there some way to get the size of the current request from proxy_pass so I can compare it to the Content_Length and discard it if it's mismatched?

Ideally the system wouldn't tag incomplete responses as 200 OK, so they wouldn't end up as short returns in my memcache for their cache duration.
Subject Author Posted

Content-Length compared to actual size before caching

ggrensteiner March 09, 2012 07:14PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 160
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready