Skip to content

[bug] Set Cache-Control header (fixes #17)

micah requested to merge cache-control into master

Before this change, the headers would look like this:

curl -vs localhost:8000/3/cert 1>/dev/null
*   Trying ::1:8000...
* Connected to localhost (::1) port 8000 (#0)
> GET /3/cert HTTP/1.1
> Host: localhost:8000
> User-Agent: curl/7.74.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Date: Tue, 25 May 2021 15:38:50 GMT
< Content-Type: text/plain; charset=utf-8
< Transfer-Encoding: chunked
< 
{ [2723 bytes data]
* Connection #0 to host localhost left intact

After this change, the headers add the Cache-Control header:

curl -vs localhost:8000/3/cert 1>/dev/null
*   Trying ::1:8000...
* Connected to localhost (::1) port 8000 (#0)
> GET /3/cert HTTP/1.1
> Host: localhost:8000
> User-Agent: curl/7.74.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Cache-Control: no-cache
< Date: Tue, 25 May 2021 15:38:17 GMT
< Content-Type: text/plain; charset=utf-8
< Transfer-Encoding: chunked
< 
{ [2719 bytes data]
* Connection #0 to host localhost left intact

Merge request reports

Loading