Re: Custom ETags

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

 



On Tue, Apr 13, 2010 at 4:50 PM, Florian S. <flo.sch@xxxxxxx> wrote:
> Am Dienstag, den 13.04.2010, 10:34 -0400 schrieb Brian Mearns:
>> I'd like to use stronger and correlated ETag, namely the hash of the
>> content being served. Obviously it's a drag to do this in-line, so I'm
>> planning an automated task to generate the ETag values and store them
>> on the server. Is there any way I can get httpd to grab these stored
>> values for use in the Etag header? I'm flexible on how I store them:
>> in a database, in one large file, each in its own file named according
>> to the resource, etc.
>>
>> Any ideas?
>>
>> Thanks,
>> -Brian
>>
>
> Hi,
>
> Here a short presentation of how I would face this problem:
> I found a nice & powerful way of including external scripts depending on
> URL/I: RewriteMap. I think its performance is sufficient, since the
> process gets spawned only once and the stdio-stuff happens only.
> Text-Databases are supported, too. The output (the ETag?) could be
> stored in a Envar with a corresponding RewriteRule (E-flag). Then you
> can do a few checks and/or use 'Header set ETag new_tag env=new_tag' or
> something similiar.
>
> Not tested at all & sounds strange, but may be a starting point.
>
> Regards:
>        Florian
>
[snip]

Thanks, Florian. That's a pretty clever idea, definitely something
I'll add to my bag of tricks. I don't think it will help me in this
case, though, as it occurs to me that just setting the ETag header
isn't enough, I have to get Apache to act on it (honor conditional
requests). It sounds like the only real Apache solution is to create a
module to do what I want, but that's probably not going to happen
anytime soon.

In the mean time, I probably will just throw together a PHP script
through which all the appropriate resources are accessed. It can read
the Etags from the file/database and decide what to do with
conditional responses.

Thanks for the great idea!
-Brian


-- 
Feel free to contact me using PGP Encryption:
Key Id: 0x3AA70848
Available from: http://keys.gnupg.net

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-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