LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > General > How are ETag generated by default?

Reply
 
Thread Tools Display Modes
  #1  
Old 03-16-2012, 09:37 AM
romfladef romfladef is offline
New Member
 
Join Date: Mar 2012
Posts: 2
Exclamation How are ETag generated by default?

Sorry, the browser's session had expired while I was writing this.

Hi all, I'm new to the forum: I know that LiteSpeed doesn't handle the FileETag option in .htaccess, but my question is a little different!

I noticed that the server produce ETag like:

6106-4f5f3bc1-0

How are those generated by default? Thank you!
Reply With Quote
  #2  
Old 03-16-2012, 11:43 AM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,339
Here is a general answer:

http://en.wikipedia.org/wiki/HTTP_ETag

Common methods of ETag generation include using a collision-resistant hash function of the resource's content, a hash of the last modification timestamp, or even just a revision number.

Edit:

ETag '-0' is set when "No I-Node in ETag" is set to Yes.

Last edited by webizen; 03-16-2012 at 12:04 PM..
Reply With Quote
  #3  
Old 03-16-2012, 12:02 PM
romfladef romfladef is offline
New Member
 
Join Date: Mar 2012
Posts: 2
Quote:
Originally Posted by webizen View Post
Here is a general answer:

http://en.wikipedia.org/wiki/HTTP_ETag

Common methods of ETag generation include using a collision-resistant hash function of the resource's content, a hash of the last modification timestamp, or even just a revision number.
Usually, ETag are provided by Apache with: INode MTime Size, with CRC32 as cryptographic algorithm... but I noticed that LiteSpeed has another way to generate them (apart from the INode removal by the control panel I can't access in my hosting). I wasn't able to decipher it. I mean, -0 seems to be an incremental number, while I can't understand what the first and the second field represent. There are several chipers to encode ETag, from MD5 to CRC32. I'd like to use the same default algorithm to generate ETag via PHP for dynamic contents, because I can't modify them via FileETag on .htaccess that's unsupported by LiteSpeed for image, etc.! I tried looking at the web servers' sources, but it didn't help!
Reply With Quote
  #4  
Old 03-20-2012, 02:31 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,339
it is unnecessary to use the same algorithm for dynamic contents as LSWS does not honor that anyway.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:06 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.