|
|
Choosing A Webhost: |
Re: Why isn't Cache-Control removed with remove_content_headers?: msg#00021lang.perl.modules.lwp
On Wed, Jan 25, 2006 at 01:49:16AM -0800, Gisle Aas wrote: > Bill Moseley <moseley@xxxxxxxx> writes: > > > I've been setting both Cache-Control max-age and Expires. But I > > noticed that remove_content_headers() only removes the > > @entity_headers which only includes Expires. > > > > Should remove_content_headers remove both? > > I'm not sure. RFC 2616 section 4.5 starts out saying "There are a few > header fields which have general applicability for both request and > response messages, but which do not apply to the entity being > transferred." and Cache-Control is one of these. This implies that > remove_content_headers shouldn't touch it. I'm not sure either. Expires and Cache-Control have somewhat similar function (section 14.9.3 discusses what happens when both are present) so I thought it odd that one would be removed and not the other. Like Expires, Cache-Control does describe what to do with the content in a response, so would seem reasonable to consider it a content header. On there other hand, I believe it's possible to include Expires and Cache-Control on a 304 response that contains no content. I'm not sure why Cache-Control isn't listed in 7.1 Entity Header Fields, as Cache-Control can override Expires as noted in 14.21. So, ya, I'm not sure. > Does the current behaviour create a problem in your application? Not really a problem. I have a response that includes Last-Modified, Content-Length, Cache-Control max-age, and Expires. In some cases that content is further processed and becomes non-cacheable. So I need to remove all headers except Last-Modified (and even leaving last-modified is questionable). So I was trying to use remove_content_headers for a different purpose, I suppose. -- Bill Moseley moseley@xxxxxxxx
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Setting content type., Gisle Aas |
|---|---|
| Next by Date: | Re: URI.pm error, Nigel Horne |
| Previous by Thread: | Re: Why isn't Cache-Control removed with remove_content_headers?, Gisle Aas |
| Next by Thread: | Setting content type., Bill Moseley |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |