You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to try out conditional requests (ref: picosh/pico#177) and I noticed that Souin seems to work fine with If-None-Match: "<etag>" conditional requests, but doesn't seem to work with If-Modified-Since: <date> conditional requests.
Example:
# Store the file in the cache
$ curl -iH "Host: picouser-test.pgs.dev.pico.sh" localhost:3000/file.txt
HTTP/1.1 200 OK
Cache-Control: max-age=600
Cache-Status: Souin; fwd=uri-miss; stored; key=GET-http-picouser-test.pgs.dev.pico.sh-/file.txt
Content-Length: 14
Content-Type: text/plain
Etag: "a9a83095955b3d3efacc7f833a103cb2-1"
Last-Modified: Sat, 21 Dec 2024 03:03:10 GMT
Surrogate-Key: picouser-test
Date: Sat, 21 Dec 2024 15:24:23 GMT
Hello, World!
# Send conditional request
$ curl -iH "Host: picouser-test.pgs.dev.pico.sh" -H "If-Modified-Since: Sat, 21 Dec 2024 09:09:10 GMT" localhost:3000/file.txt
HTTP/1.1 200 OK
Age: 56
Cache-Control: max-age=600
Cache-Status: Souin; hit; ttl=544; key=GET-http-picouser-test.pgs.dev.pico.sh-/file.txt; detail=OTTER
Content-Length: 14
Content-Type: text/plain
Date: Sat, 21 Dec 2024 15:24:23 GMT
Etag: "a9a83095955b3d3efacc7f833a103cb2-1"
Last-Modified: Sat, 21 Dec 2024 03:03:10 GMT
Surrogate-Key: picouser-test
Hello, World!
It should have returned a 304 Not Modified response. Any ideas?
The text was updated successfully, but these errors were encountered:
Hello! We managed to get Souin integrated into pgs.sh and it's working great so far! https://blog.pico.sh/ann-026-pages-http-caching
I wanted to try out conditional requests (ref: picosh/pico#177) and I noticed that Souin seems to work fine with
If-None-Match: "<etag>"
conditional requests, but doesn't seem to work withIf-Modified-Since: <date>
conditional requests.Example:
It should have returned a 304 Not Modified response. Any ideas?
The text was updated successfully, but these errors were encountered: