On Mon, 2007-12-10 at 17:26 +0900, Adrian Chadd wrote:
> 
> Why/where is the code assuming that offset 0 will be HDR_DATE and
> offset 1 will
> be HDR_EXPIRES? The replacement code doesn't check to see whether
> anything is
> at the position in the array that its inserting into..
> 
> Would it make more sense to modify httpHeaderDelById() to return the
> first offset
> it found a header of that type at and then make httpHeaderInsertTime()
> use that?
> Or perhaps replace that with a httpHeaderReplaceEntry() to replace an
> entry at
> that position? httpHeaderInsertEntry() is only used by
> httpHeaderInsertTime(); 
> httpHeaderInsertTime() is only ever called in the above snippet of
> code.

I haven't checked the code yet but 'insert' suggests to me that it
inserts and shifts everthing down, as Amos says - inserting at 0 makes
sense when adding both an expires and date header.

-Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to