You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2020/11/19 19:00:29 UTC

[Bug 64934] New: Cache control header missing for HEAD request but works for GET

https://bz.apache.org/bugzilla/show_bug.cgi?id=64934

            Bug ID: 64934
           Summary: Cache control header missing for HEAD request but
                    works for GET
           Product: Apache httpd-2
           Version: 2.4.46
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_headers
          Assignee: bugs@httpd.apache.org
          Reporter: rakmvk@gmail.com
  Target Milestone: ---

Cache control header missing for HEAD request but works for GET.


curl -I https://localhost/support.html  -k
HTTP/1.1 200 OK
Date: Thu, 19 Nov 2020 16:35:48 GMT
Server: Apache
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Frame-Options: SAMEORIGIN
Content-Security-Policy: frame-ancestors 'self'
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Content-Type: text/html;charset=utf-8
Content-Language: en

Using GET 

curl -i http://localhost/support.html
Server: Apache
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Frame-Options: SAMEORIGIN
Content-Security-Policy: frame-ancestors 'self'
Last-Modified: Thu, 19 Nov 2020 18:57:55 GMT
Accept-Ranges: bytes
Content-Length: 206001
Expires: Fri, 20 Nov 2020 18:58:00 GMT
Vary: Accept-Encoding
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Cache-Control: public, max-age=86400
Content-Type: text/html
Content-Language: en

we do have a ADOBE aem dispatcher module in between , but this behavior was
completely  different on Apache2.2 were header appears on both HEAD and GET

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 64934] Cache control header missing for HEAD request but works for GET

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64934

Rakesh <ra...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |Beginner

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 64934] Cache control header missing in HEAD request during cache miss

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64934

Rakesh <ra...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Cache control header        |Cache control header
                   |missing in HEAD during      |missing in HEAD request
                   |cache miss                  |during cache miss

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 64934] Cache control header missing in HEAD during cache miss

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64934

--- Comment #3 from Rakesh <ra...@gmail.com> ---
To be more precise this behavior happens when content is not cached on Apache
request is passed to the backend server and on the response header is missing .
when the content is cached on apache header is inserted properly.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 64934] Cache control header missing in HEAD during cache miss

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64934

Rakesh <ra...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Cache control header        |Cache control header
                   |missing for HEAD request    |missing in HEAD during
                   |but works for GET           |cache miss

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 64934] Cache control header missing for HEAD request but works for GET

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64934

--- Comment #2 from Rakesh <ra...@gmail.com> ---
(In reply to Rakesh from comment #1)
> changed  cache control rule.
> from
> Header set Cache-Control "public, max-age=86400"
> to
> Header always set Cache-Control "public, max-age=86400"



Can any one guide me how apache determines not to add header, since
documentation suggest if there is error from backend apache will not add header
if onsuccess is used , above fix will add cache control header  to even 404 and
302 . I am not able to find a reason why Apache is not adding header.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 64934] Cache control header missing for HEAD request but works for GET

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64934

Rakesh <ra...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rakmvk@gmail.com

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 64934] Cache control header missing for HEAD request but works for GET

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64934

Rakesh <ra...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #1 from Rakesh <ra...@gmail.com> ---
changed  cache control rule.
from
Header set Cache-Control "public, max-age=86400"
to
Header always set Cache-Control "public, max-age=86400"

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 64934] Cache control header missing for HEAD request but works for GET

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64934

Rakesh <ra...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org