Re: AW: mod_cache/mod_cache_disk responses missing Content-Type header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 21, 2015 at 11:39:55AM -0500, Eric Covener wrote:
> On Mon, Dec 21, 2015 at 11:25 AM, Alexander Härtig
> <Alexander.Haertig@xxxxxx> wrote:
> > AH00717: Premature end of cache headers.
> 
> The error reporting is very poor there. Are you able to patch
> mod_cache_disk and run with at least LogLevel debug?
> 
> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_cache_disk.c?r1=1721210&r2=1721209&pathrev=1721210


trace8 brings nothing new w.r.t debug (as sent in my previous email)

I found the following behavior interesting :
GET /  => OK          # put in cache
POST / => OK          # invalidate cache
POST / => not OK      # cache_disk:error AH00717

My guess is that it comes from following patch from 2013:
> mod_cache: Invalidate cached entities in response to RFC2616 Section
https://mail-archives.apache.org/mod_mbox/httpd-cvs/201305.mbox/%3C20130528203005.1A55D2388A32@xxxxxxxxxxxxxxx%3E

* It seems it introduced a CACHE_INVALIDATE filter (for which, sadly, I
  didn't find much documentation)
* I guess it introduced an invalid code path triggering
  invalidate_entity() => recall_headers() for an already invalidated entity.

Maybe this error it just the symptom of trying to invalidate a "removed"
entity twice.

When doing tests I was also able to encouter easily:
> AH02468: cache: Attempted to invalidate cached entity with key: http://xxxx:80/index.php?
by just playing a bit with htcacheclean

(side note: htcacheclean -A <URL> is an incorrect usage, but an unexpected behavior)


Going further, I guess that the second invalidation shows this issue because
the first invalidation (in during the first POST) failed to output a
valid mod_cache file.

Attached the initial cache header file (GET.txt, just after a GET), copied from
/var/cache/apache2/mod_cache_disk/6q/m_/*.header.vary/ou/Ye/*.header 
and then just after a POST was issued (successive POSTs cause the error
but don't change this file anymore) : POST.txt


I hope it makes things clearer and could help bringing up a full
explanation + fix + workaround.


thank you
�&y׾8�yz�J���8�y׾8�1��C,������������������������http://developmentsystem:80/index.php?Vary: Cookie, Cookie
Vary: Cookie, Cookie
Last-Modified: Sun, 03 Apr 2016 16:21:51 GMT
X-Pingback: http://developmentsystem/xmlrpc.php
Cache-Control: public, max-age=300
Link: <http://developmentsystem/wp-json/>; rel="https://api.w.org/";, <http://developmentsystem/>; rel=shortlink
Content-Type: text/html; charset=UTF-8

Authorization: Basic xxxxxxxx
Host: developmentsystem
User-Agent: lwp-request/6.03 libwww-perl/6.08

�&y׾8�yz�J���8�y׾8�1��C,������������������������http://developmentsystem:80/index.php?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux