You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by GitBox <gi...@apache.org> on 2022/09/13 00:27:36 UTC

[GitHub] [trafficserver] mlibbey opened a new issue, #9087: pragma is overriding cache-control

mlibbey opened a new issue, #9087:
URL: https://github.com/apache/trafficserver/issues/9087

   https://www.rfc-editor.org/rfc/rfc7234#section-5.4
   says
   
   
   >    The "Pragma" header field allows backwards compatibility with
   >    HTTP/1.0 caches, so that clients can specify a "no-cache" request
   >    that they will understand (as Cache-Control was not defined until
   >    HTTP/1.1).  **When the Cache-Control header field is also present and
   >    understood in a request, Pragma is ignored**.
   
   https://www.rfc-editor.org/rfc/rfc9111#name-pragma
   deprecates pragma completely.
   
   ATS 9 is using the pragma: no-cache instead of cache-control value. here's an httpbin example
   remap http://myhttpbin.com http://httpbin.org
   
   ```
   # first make a request that will get both pragma and CC. This should result in a cached object
   $ curl -s -IXGET --resolve myhttpbin.com:80:${ip} "http://myhttpbin.com/response-headers?Cache-Control=max-age=5,public&pragma=no-cache"
   HTTP/1.1 200 OK
   Date: Mon, 12 Sep 2022 22:17:26 GMT
   Content-Type: application/json
   Content-Length: 134
   pragma: no-cache
   Cache-Control: max-age=5,public
   Access-Control-Allow-Origin: *
   Access-Control-Allow-Credentials: true
   X-B3-TraceId: bc05ab94a40fce28
   Strict-Transport-Security: max-age=31536000
   Age: 0
   Via: https/1.1 myservername  [uScMsSf pSeN:t cCMpSs ])
   Connection: close
   
   $ curl -s -IXGET --resolve myhttpbin.com:80:${ip} "http://myhttpbin.com/response-headers?Cache-Control=max-age=50,public&pragma=no-cache" -H"Cache-Control:only-if-cached"
   HTTP/1.1 200 OK
   Date: Mon, 12 Sep 2022 22:17:57 GMT
   Content-Type: application/json
   Content-Length: 134
   pragma: no-cache
   Cache-Control: max-age=50,public
   Access-Control-Allow-Origin: *
   Access-Control-Allow-Credentials: true
   X-B3-TraceId: 2e2f1fafa14608af
   Strict-Transport-Security: max-age=31536000
   Age: 0
   Via: https/1.1 myservername  [uScMsSf pSeN:t cCMpSs ])
   Connection: close
   ```
   vs
   ```
   $ curl -s -IXGET --resolve myhttpbin.com:80:${ip} "http://myhttpbin.com/response-headers?Cache-Control=max-age=50,public"
   HTTP/1.1 200 OK
   Date: Tue, 13 Sep 2022 00:23:47 GMT
   Content-Type: application/json
   Content-Length: 110
   Cache-Control: max-age=50,public
   Access-Control-Allow-Origin: *
   Access-Control-Allow-Credentials: true
   X-B3-TraceId: 4e06a0af546d48ba
   Strict-Transport-Security: max-age=31536000
   Age: 5
   Via: https/1.1 myservername
   Connection: close
   
   $ curl -s -IXGET --resolve myhttpbin.com:80:${ip} "http://myhttpbin.com/response-headers?Cache-Control=max-age=50,public" -H"Cache-Control:only-if-cached"
   HTTP/1.1 200 OK
   Date: Tue, 13 Sep 2022 00:23:47 GMT
   Content-Type: application/json
   Content-Length: 110
   Cache-Control: max-age=50,public
   Access-Control-Allow-Origin: *
   Access-Control-Allow-Credentials: true
   X-B3-TraceId: 4e06a0af546d48ba
   Strict-Transport-Security: max-age=31536000
   Age: 30
   Via: myservername 
   Connection: close
   
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] bneradt closed issue #9087: pragma is overriding cache-control

Posted by GitBox <gi...@apache.org>.
bneradt closed issue #9087: pragma is overriding cache-control
URL: https://github.com/apache/trafficserver/issues/9087


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org