Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Bugs

[Bug 53539] content type and character set are changing when the content served from disk_cache becomes 'stale'

 

 

Apache bugs RSS feed   Index | Next | Previous | View Threaded


bugzilla at apache

Jul 12, 2012, 1:34 AM

Post #1 of 6 (136 views)
Permalink
[Bug 53539] content type and character set are changing when the content served from disk_cache becomes 'stale'

https://issues.apache.org/bugzilla/show_bug.cgi?id=53539

Paul Beckett <p.beckett [at] uea> changed:

What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |major

--
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe [at] httpd
For additional commands, e-mail: bugs-help [at] httpd


bugzilla at apache

Jul 12, 2012, 3:24 AM

Post #2 of 6 (128 views)
Permalink
[Bug 53539] content type and character set are changing when the content served from disk_cache becomes 'stale' [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=53539

Paul Beckett <p.beckett [at] uea> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |p.beckett [at] uea

--
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe [at] httpd
For additional commands, e-mail: bugs-help [at] httpd


bugzilla at apache

Jul 12, 2012, 6:27 AM

Post #3 of 6 (132 views)
Permalink
[Bug 53539] content type and character set are changing when the content served from disk_cache becomes 'stale' [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=53539

--- Comment #1 from Ruediger Pluem <rpluem [at] apache> ---
Can you please check if r1132816 fixes your problem? The patch is at
http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_cache.c?r1=1132816&r2=1132815&pathrev=1132816&view=patch

--
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe [at] httpd
For additional commands, e-mail: bugs-help [at] httpd


bugzilla at apache

Jul 12, 2012, 6:53 AM

Post #4 of 6 (134 views)
Permalink
[Bug 53539] content type and character set are changing when the content served from disk_cache becomes 'stale' [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=53539

--- Comment #2 from Paul Beckett <p.beckett [at] uea> ---
(In reply to comment #1)
> Can you please check if r1132816 fixes your problem? The patch is at
> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_cache.
> c?r1=1132816&r2=1132815&pathrev=1132816&view=patch

I have very little experience of using patch.... so sorry if this is my mistake
/ mis-understanding.

It looks to me like this 'change' is already in Apache 2.4.2, which I'm using,
the modules/cache/mod_cache lines look like:

r->headers_out = cache->stale_handle->resp_hdrs;

ap_set_content_type(r, apr_table_get(
cache->stale_handle->resp_hdrs, "Content-Type"));

/* add a revalidation warning */
warn_head = apr_table_get(r->err_headers_out, "Warning");
if ((warn_head == NULL) || ((warn_head != NULL)

running the patch file, results in a some warnings:

patch /usr/local/httpd-2.4.2/modules/cache/mod_cache.c
/server-build/installers/apache_httpd/mod_cache.c.patch
patching file /usr/local/httpd-2.4.2/modules/cache/mod_cache.c
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n] y
Hunk #1 succeeded at 795 with fuzz 2 (offset -48 lines).


and a file that looks like:
r->headers_out = cache->stale_handle->resp_hdrs;

ap_set_content_type(r, apr_table_get(
cache->stale_handle->resp_hdrs, "Content-Type"));

ap_set_content_type(r, apr_table_get(
cache->stale_handle->resp_hdrs, "Content-Type"));

/* add a revalidation warning */
warn_head = apr_table_get(r->err_headers_out, "Warning");


I haven't built or tried this, as I assume duplicating the ap_set_content_type
line isn't the intention.

--
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe [at] httpd
For additional commands, e-mail: bugs-help [at] httpd


bugzilla at apache

Jul 12, 2012, 8:12 AM

Post #5 of 6 (127 views)
Permalink
[Bug 53539] content type and character set are changing when the content served from disk_cache becomes 'stale' [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=53539

--- Comment #3 from Ruediger Pluem <rpluem [at] apache> ---
(In reply to comment #2)

You are correct. I looked in two different locations. The patch I mentioned is
already in 2.4.2. Can you please try the following one:

Index: modules/cache/mod_cache.c
===================================================================
--- modules/cache/mod_cache.c (revision 1352429)
+++ modules/cache/mod_cache.c (working copy)
@@ -1686,6 +1686,9 @@

r->err_headers_out = cache->stale_handle->resp_hdrs;

+ ap_set_content_type(r, apr_table_get(
+ cache->stale_handle->resp_hdrs,
"Content-Type"));
+
/* add a revalidation warning */
warn_head = apr_table_get(r->err_headers_out, "Warning");
if ((warn_head == NULL) || ((warn_head != NULL)

--
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe [at] httpd
For additional commands, e-mail: bugs-help [at] httpd


bugzilla at apache

Jul 13, 2012, 3:26 AM

Post #6 of 6 (127 views)
Permalink
[Bug 53539] content type and character set are changing when the content served from disk_cache becomes 'stale' [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=53539

--- Comment #4 from Paul Beckett <p.beckett [at] uea> ---
Thanks for your help. I've applied this patch and rebuilt, but I'm still seeing
the same problem:

Initially CSS pages from cache have:
HTTP request status: 200 (OK)
Name Value
Date Fri, 13 Jul 2012 09:14:38 GMT
Age 2815
Content-Length 374
Last-Modified Thu, 12 Jul 2012 15:27:06 GMT
Server Web Server
ETag W/"374-1342106826000"
Content-Type text/css;charset=utf-8
Accept-Ranges bytes



but once the content has become stale, the content-type / character set is
changing:
Date Fri, 13 Jul 2012 08:27:43 GMT
Connection close
Content-Length 374
Last-Modified Thu, 12 Jul 2012 15:27:06 GMT
Server Apache-Coyote/1.1
ETag W/"374-1342106826000"
Warning 111 Revalidation failed
Content-Type text/html; charset=iso-8859-1
Accept-Ranges bytes


Thanks,
Paul

--
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe [at] httpd
For additional commands, e-mail: bugs-help [at] httpd

Apache bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.