Bug #2068

mod_expire adding Cache-Control header

Added by glen over 5 years ago. Updated over 3 years ago.

Status:FixedStart date:2009-09-18
Priority:NormalDue date:
Assignee:glen% Done:

100%

Category:mod_expire
Target version:1.4.24
Missing in 1.5.x:Yes

Description

seems if mod_env combined with mod_expires to have such headers breaks:

    expire.url = (
        "/" => "access plus 5 weeks",
    )

    setenv.add-response-header += (
        "Cache-Control" => "public" 
    )
Cache-Control: public
Cache-Control: max-age=3024000

while the expected result is:

Cache-Control: public, max-age=3024000

expire2.patch Magnifier - patch. tested. works (2.15 KB) glen, 2009-09-18 12:40

expire-1.5.patch Magnifier - patch for 1.5 (2.19 KB) glen, 2010-01-21 08:48

expire-1.5b.patch Magnifier - bugx (2.19 KB) glen, 2010-01-22 14:25

Associated revisions

Revision 2621
Added by glen about 5 years ago

- Combine Cache-Control header value in mod_expire to existing HTTP header if header already added by other modules (fixes #2068)

Revision 2781
Added by glen over 3 years ago

- Combine Cache-Control header value in mod_expire to existing HTTP header if header already added by other modules (fixes #2068)

History

#1 Updated by glen over 5 years ago

proposed patch. tested works:

  Cache-Control: public, max-age=3024000

#2 Updated by glen over 5 years ago

  • % Done changed from 0 to 90

#3 Updated by glen about 5 years ago

  • Status changed from New to Fixed
  • % Done changed from 90 to 100

Applied in changeset r2621.

#4 Updated by pioklo almost 5 years ago

Hello !

Its possible to append this patch into 1.5.x ?

regards,
Piotr

#5 Updated by glen almost 5 years ago

patch against r2704, please test and report back!

#6 Updated by pioklo almost 5 years ago

if (NULL != (ds = (data_string *)array_get_element(con->response.headers, key))) {

should be

if (NULL != (ds = (data_string *)array_get_element(con->response.headers, key,keylen ))) {

I have have tested this patch and my few servers working fine

Regards,
Piotr Kloc

#7 Updated by glen almost 5 years ago

#8 Updated by demimurych over 3 years ago

File expire-1.5b.patch have error
in line
if (NULL != (ds = (data_string *)array_get_element(con->response.headers, key, leylen))) {

should be
if (NULL != (ds = (data_string *)array_get_element(con->response.headers, key, keylen))) {

leylen => keylen

Also available in: Atom