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 2006/08/02 18:14:58 UTC

DO NOT REPLY [Bug 40169] New: - CacheEnable not caching Forward proxy

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40169>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40169

           Summary: CacheEnable not caching Forward proxy
           Product: Apache httpd-2
           Version: 2.2-HEAD
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: mod_cache
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: rpender@us.ibm.com


I am doing some work with Apache 2.2.3 (win32 and linux) and am running into
some problems with CacheEnable and proxy requests. My ultimate goal is to cache
only forward proxy requests (with mod_disk_cache), but right now I am running
into problems with the basic scenario of just http proxied url's.

The 2.2 CacheEnable documentation lists the following example:
# Cache content from www.apache.org
CacheEnable disk http://www.apache.org/ 

This works as expected (caches proxy requests to apache.org, but not others). 
If I then change it to:
CacheEnable disk http://

My same proxy request to http://www.apache.org does not get cached on my server.
 The debug level error log does not list the cache save filter as ever being
added (while it does when i use CacheEnable disk http://www.apache.org/), so I
never am able to see why the request to the url was not cached.  Should this not
be cached? I see the same example in the CacheEnable 2.2 doc for proxied ftp
requests (CacheEnable disk ftp://).

I know an easy solution to caching only proxy requests would be to put the catch
all 'CacheEnable disk  /' in a virtual host - but I need to be able to cover the
scenario of when a customer wants to only cache proxy requests, and specifies it
in the server context.

Should 'cacheenable disk http://' be caching all http proxy requests? How do you
 cache proxy requests to all protocols? Would I have to cacheenable for every
protocol?

This problem exists on win32 and unix 2.2.3 source.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 40169] - CacheEnable not caching Forward proxy

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40169>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40169





------- Additional Comments From pg_asf@asf.for.sabi.co.UK  2006-09-20 00:14 -------
(In reply to comment #7 and #8)

> Agreed.  I think the documentation could be worded a 
little better, and even the
> addition of a CacheEnableMatch could be handy.  I think 
your suggestion is
> correct for the problem at hand though.

Oh I got impatient with the matching logic and while I have 
not added 'CacheEnableMath' or 'CacheDisableMatch' I have 
rewritten and rather generalized the matching process by 
giving it comprehensible semantics.

I found that the matching logic is passed not the URI but 
four distinct fields for scheme, hostname, port and path, so 
they are matched separately. Then I decided that the scheme 
should not be really prefix-matched. Among the changes:

* Now a "/...." will not match a proxy URI 
like "http://...", and viceversa of course.

* Prefix matching for hostnames does not make much sense, do 
I have added minimal suffix matching: "*w.example.com" will 
match any hostname ending in "w.example.com" 
and ".example.com" will match any hostname ending 
in ".example.com".

All I have tested it a bit (I have removed the extensive 
debugging code from the submitted patch) and it is all 
nicely commented.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 40169] - CacheEnable not caching Forward proxy

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40169>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40169


rpender@us.ibm.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|bugs@httpd.apache.org       |rpluem@apache.org
             Status|NEEDINFO                    |NEW




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 40169] - CacheEnable not caching Forward proxy

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40169>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40169


rpender@us.ibm.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable
           Platform|PC                          |All




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 40169] - CacheEnable not caching Forward proxy

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40169>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40169


rpluem@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|rpluem@apache.org           |bugs@httpd.apache.org




------- Additional Comments From rpluem@apache.org  2006-08-31 21:06 -------
Please never change the assignment of bugs.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 40169] - CacheEnable not caching Forward proxy

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40169>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40169





------- Additional Comments From rpender@us.ibm.com  2006-08-10 17:04 -------
Created an attachment (id=18694)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18694&action=view)
Fix CacheEnable forward proxy when only protocol specified

my fix is in uri_meets_conditions(). One line fix.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 40169] - CacheEnable not caching Forward proxy

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40169>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40169





------- Additional Comments From pg_asf@asf.for.sabi.co.UK  2006-09-19 19:33 -------
(In reply to comment #4)
> Created an attachment (id=18695)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18695&action=view) [edit]
> unified diff for cache_util.c
> 
> Sorry bout that - 1st time patch submitter.
> Here is the unified diff file for the patch.

The patch is not general enough I think. The language in the 
documentation leads to me think that *any* subprefix 
matches.

That "ht", "http:", "http://", "http://www.", "http://www.apa" 
all match "http://www.apache.org".

So the "strcasecmp(filter.hostname, url.hostname)" should be 
replaced by

  "strncasecmp(filter.hostname,
    url.hostname,strlen(filter.hostname))"

or equivalent. Actually this check should be applied to the 
whole URI, not just the 'hostname' part.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 40169] - CacheEnable not caching Forward proxy

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40169>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40169





------- Additional Comments From rpender@us.ibm.com  2006-08-10 17:06 -------
(In reply to comment #0)
I have attached a proposed fix to this problem.  Should work for all protocols.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 40169] - CacheEnable not caching Forward proxy

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40169>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40169


rpender@us.ibm.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #18694|0                           |1
        is obsolete|                            |




------- Additional Comments From rpender@us.ibm.com  2006-08-10 20:06 -------
Created an attachment (id=18695)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18695&action=view)
unified diff for cache_util.c

Sorry bout that - 1st time patch submitter. Here is the unified diff file for
the patch.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 40169] - CacheEnable not caching Forward proxy

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40169>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40169


rpluem@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




------- Additional Comments From rpluem@apache.org  2006-08-10 19:18 -------
Please provide a diff file of your fix for review (see also
http://httpd.apache.org/dev/patches.html).

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 40169] - CacheEnable not caching Forward proxy

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40169>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40169


pg_asf@asf.for.sabi.co.UK changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #18695|0                           |1
        is obsolete|                            |




------- Additional Comments From pg_asf@asf.for.sabi.co.UK  2006-09-20 00:09 -------
Created an attachment (id=18889)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18889&action=view)
Fixes some issues in 'CacheEnable' and 'CacheDisable' matching and extends a
bit the functionality.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 40169] - CacheEnable not caching Forward proxy

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40169>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40169


rpender@us.ibm.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #18694|Fix CacheEnable forward     |(cache_util.c)Fix
        description|proxy when only protocol    |CacheEnable forward proxy
                   |specified                   |when only protocol specified




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 40169] - CacheEnable not caching Forward proxy

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40169>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40169





------- Additional Comments From rpender@us.ibm.com  2006-09-19 19:43 -------
(In reply to comment #6)

Agreed.  I think the documentation could be worded a little better, and even the
addition of a CacheEnableMatch could be handy.  I think your suggestion is
correct for the problem at hand though.



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org