Welcome! Log In Create A New Profile

Advanced

Make Nginx not process If-Match header

Posted by jboyter14 
Make Nginx not process If-Match header
May 19, 2016 09:09AM
Hi,
In my Nginx environment, if I post to a URL that it handles and I set the request header If-Match, then it returns with: 412 Precondition Failed. I'm assuming this is normally the expected behavior. However, I want Nginx to ignore all headers and just pass them through. Any ideas how to do that?

Thanks
Re: Make Nginx not process If-Match header
October 28, 2016 03:50AM
I have the same problem - I need to be able to handle resource comparison logic myself. How can I do this?
Re: Make Nginx not process If-Match header
January 31, 2017 11:53AM
I am facing similar issue wherein nginx throws 412 for If-Match even when response header etag value matches it for a GET request.
Also request is being handled via X-Accel-Redirect flow having few hops

Here's sample debug error log for clue

2017/01/31 20:55:28 [debug] 795#0: *6 http upstream process header
2017/01/31 20:55:28 [debug] 795#0: *6 malloc: 0000000002389820:32768
2017/01/31 20:55:28 [debug] 795#0: *6 recv: fd:14 18000 of 32524
2017/01/31 20:55:28 [debug] 795#0: *6 http proxy status 200 "200 OK"
2017/01/31 20:55:28 [debug] 795#0: *6 http proxy header: "Server: Apache-Coyote/1.1"
2017/01/31 20:55:28 [debug] 795#0: *6 http proxy header: "Accept-Ranges: bytes"
2017/01/31 20:55:28 [debug] 795#0: *6 http proxy header: "Content-Length: 17509641"
2017/01/31 20:55:28 [debug] 795#0: *6 http proxy header: "Date: Tue, 31 Jan 2017 15:25:28 GMT"
2017/01/31 20:55:28 [debug] 795#0: *6 http proxy header: "Connection: close"
2017/01/31 20:55:28 [debug] 795#0: *6 http proxy header done
2017/01/31 20:55:28 [debug] 795#0: *6 http special response: 412, "/get-redirect?
2017/01/31 20:55:28 [debug] 795#0: *6 headers more header filter, uri "/get-redirect"
2017/01/31 20:55:28 [debug] 795#0: *6 posix_memalign: 000000000235DB20:4096 @16
2017/01/31 20:55:28 [debug] 795#0: *6 HTTP/1.1 412 Precondition Failed
Server: nginx/1.8.0
Date: Tue, 31 Jan 2017 15:25:28 GMT
Content-Type: text/html
Content-Length: 188
Connection: keep-alive
Re: Make Nginx not process If-Match header
January 31, 2017 01:40PM
Looks like the 412 is coming from your backend (apache) and not nginx.

---
nginx for Windows http://nginx-win.ecsds.eu/
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 178
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