Hi,
Why do we need to set the content type at cache_storage.c at line
240, i just commented it out and it seems to be working. Sorry about
my ignorance, but may it cause a side effect?
Thanks,
Tacio
PS:
diff -u cache_storage.c-orig cache_storage.c
--- cache_storage.c-orig Thu May 23 17:33:31 2002
+++ cache_storage.c Thu May 23 17:32:59 2002
@@ -237,7 +237,7 @@
return rv;
}
- ap_set_content_type(r, apr_pstrdup(r->pool, info->content_type));
+ /*ap_set_content_type(r, apr_pstrdup(r->pool, info->content_type));*/
r->filename = apr_pstrdup(r->pool, info->filename );
return APR_SUCCESS;
Tacio A.G. Santos wrote:
> Thanks ,
> It solved the problem with file permission, but there's still a
> problem with the content type.
> For example getting a index.html file i get in the first request:
>
> 2 Date: Thu, 23 May 2002 14:14:46 GMT
> 3 Server: Apache/1.3.23 (Unix) mod_perl/1.26
> 4 Content-Location: index.html.en
> 5 Vary: negotiate,accept-language,accept-charset
> 6 TCN: choice
> 7 Last-Modified: Tue, 23 Apr 2002 14:56:35 GMT
> 8 ETag: "6cb4-5b1-3cc57623;3cc57623"
> 9 Accept-Ranges: bytes
> 10 Content-Type: text/html; charset=ISO-8859-1
> 11 Content-Language: en
> 12 Via: 1.0 sitak:8080
> 13 Content-Length: 1457
> 14 Connection: close
>
> If i try to get it again the following headers are returned:
>
>
> 2 Date: Thu, 23 May 2002 14:21:24 GMT
> 3 Server: Apache/1.3.23 (Unix) mod_perl/1.26
> 4 Content-Location: index.html.en
> 5 Vary: negotiate,accept-language,accept-charset
> 6 TCN: choice
> 7 ETag: "6cb4-5b1-3cc57623;3cc57623"
> 8 Accept-Ranges: bytes
> 9 Content-Language: en
> 10 Via: 1.0 sitak:8080
> 11 Last-Modified: Tue, 23 Apr 2002 14:56:35 GMT
> 12 Content-Type: text/plain; charset=ISO-8859-1
> 13 Content-Length: 1457
> 14 Connection: close
>
>
> It just changed the Content-Type to text/plain. It also happens with
> image files. Somehow mod_cache is not taking into account the
> Content-Type written in the respective cache header file. Does anybody
> know where is it set?
>
> Thanks again,
> Tacio
>
>
> Jeff Trawick wrote:
>
>> "Tacio A.G. Santos" <[EMAIL PROTECTED]> writes:
>>
>>
>>> Hi,
>>> I'm trying to configure mod_cache+mod_proxy, but mod_cache is not
>>> working properly. One thing i found strange is that if you look in the
>>> cache directory we have the following strange file permissions:
>>>
>>> -rw------- 1 webu webg 2326 May 22 16:41
>>> wkL1JcPol1pQ.data
>>> ---------- 1 webu webg 355 May 22 16:41
>>> wkL1JcPol1pQ.header
>>
>>
>>
>> Perhaps you could try this patch?
>>
>> Index: mod_disk_cache.c
>> ===================================================================
>> RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_disk_cache.c,v
>> retrieving revision 1.33
>> diff -u -r1.33 mod_disk_cache.c
>> --- mod_disk_cache.c 17 May 2002 11:33:09 -0000 1.33
>> +++ mod_disk_cache.c 23 May 2002 11:59:03 -0000
>> @@ -548,7 +548,7 @@
>>
>> rv = apr_file_open(&dobj->hfd, dobj->hdrsfile,
>> APR_WRITE | APR_CREATE | APR_EXCL,
>> - 0, r->pool);
>> + APR_OS_DEFAULT, r->pool);
>> if (rv != APR_SUCCESS) {
>> return rv;
>> }
>>
>> Thanks,
>>
>> Jeff
>
>
>
>
--
Tacio A.G. dos Santos E-mail: [EMAIL PROTECTED]
FhI FOKUS / Global Networking (GloNe) Tel: +49-30-3463-7154
Kaiserin-Augusta-Allee 31 Fax: +49-30-3463-8287
D-10589 Berlin, Germany