Comments (3)
And if i tell srcache to not cache 307 responses, it doesn't fail either.
from srcache-nginx-module.
My bad, the previous log was when i disable caching of 307 responses.
This is when i do default redirects (302)
shmtx unlock
lua redirect to "https://test3.localhost.localdomain:17443/mypath" with code 302
lua resume returned 1
lua thread yielded
lua thread aborting request with status 302
lua request cleanup: forcible=0
http lua finalize threads
lua deleting light thread 00007FCB5A54C428 (ref 2)
lua caching unused lua thread 00007FCB5A54C428 (ref 2)
http finalize request: 302, "/mypath?" a:1, c:1
http special response: 302, "/mypath?"
http script var: "0"
srcache_store decides to store the response
srcache store header HTTP/1.1 302 Moved Temporarily
Content-Type: text/html
Location: https://test3.localhost.localdomain:17443/mypath
headers more header filter, uri "/mypath"
posix_memalign: 000055F9CE825470:4096 @16
lua header filter for user lua code, uri "/mypath"
http cleanup add: 000055F9CE78FA88
code cache lookup (key='header_filter_by_lua_nhli_46c354449c5f02150cba6fbbeb9a2288', ref=-1)
code cache miss (key='header_filter_by_lua_nhli_46c354449c5f02150cba6fbbeb9a2288', ref=-1)
fetching key "test2.localhost.localdomain" in shared dict "upcacheLocks"
shmtx lock
shmtx unlock
[lua] upcache.lua:50: response(): response key 'nil', client: 127.0.0.1, server: _, request: "GET /mypath HTTP/2.0", host: "test2.localhost.localdomain:17443"
lua capture header filter, uri "/mypath"
charset: "" > "utf-8"
http2 header filter
http2 output header: ":status: 302"
http2 output header: "server: nginx"
http2 output header: "date: Sat, 14 Nov 2020 21:02:31 GMT"
http2 output header: "content-type: text/html"
http2 output header: "content-length: 138"
http2 output header: "location: https://test3.localhost.localdomain:17443/mypath"
http2 output header: "strict-transport-security: max-age=63072000; includeSubDomains; preload"
http2:1 create HEADERS frame 000055F9CE825668: len:155 fin:0
http cleanup add: 000055F9CE825770
http2 frame out: 000055F9CE825668 sid:1 bl:1 len:155
SSL buf copy: 9
SSL buf copy: 155
http2:1 HEADERS frame 000055F9CE825668 was sent
http2 frame sent: 000055F9CE825668 sid:1 bl:1 len:155
http output filter "/mypath?"
http copy filter: "/mypath?"
http script var: "1"
srcache_store skipped due to the true value in srcache_store_skip: "1"
lua capture body filter, uri "/mypath"
http postpone filter "/mypath?" 000055F9CE8258B0
http brotli filter
from srcache-nginx-module.
(edited to remove timestamps). So i diffed them and got:
this works
srcache store header HTTP/1.1 302 Moved Temporarily
Content-Type: text/html
Location: https://test3.localhost.localdomain:17443/mypath
headers more header filter, uri "/mypath"
this does not
srcache store header HTTP/1.1 307
Content-Type: text/html
Location: https://test3.localhost.localdomain:17443/mypath
srcache_fetch: buffer error when serializing the response header: -17 left, client: 127.0.0.1, server: _, request: "GET /mypath HTTP/2.0", host: "test2.localhost.localdomain:17443"
The first line in the second block does not carry "Temporary Redirect"
Ho ! "Temporary Redirect".lengh == 18 ;)
I will investigate further.
from srcache-nginx-module.
Related Issues (20)
- HTTP QUERY support
- Directives srcache_store_pass_header didn't work HOT 2
- srcache_store_min_size option missing
- $srcache_store_status always shows BYPASS HOT 5
- srcache_fetch_skip doesn't follow the value changed by access_by_lua HOT 3
- X-Cached header does not appear in the response for 404 status code
- Conflict with multiple currency plugin HOT 8
- Test cases failing on rhel 7.6 ppc64le - Errors host not found in upstream "agentzh.org" HOT 3
- skip caching basic auth HOT 4
- Reverse proxy with caching is not working.
- srcache_store response hangs with request body when used with ngx.req.get_body_data()
- Always get fetch MISS and store BYPASS when using proxy_pass HOT 1
- [help]About whether a subrequest can be nonblocked
- How to cache terabytes of data HOT 1
- Subrequest to /redis-store failing - rc=403
- How to measure cache hits/misses
- Nginx 1.23.0 header changes
- "srcache_default_expire" directive invalid value" in when using "ms" (milliseconds)
- In function ‘ngx_http_srcache_response_no_cache’ HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from srcache-nginx-module.