Search squid archive

Re: If-Unmodified-Since implementation question

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

 



On 11/03/11 12:13, Guy Bashkansky wrote:
I'm trying to implement the If-Unmodified-Since (IUMS) capability in Squid 2.x.

When a client IUMS request comes, I raise a new request flag iums,
store the iums time, and send an IMS request to the origin.  When the
origin response comes back, I modify the store entry memory objectâs
reply status according to the IUMS time logic in both
httpProcessReplyHeader() and clientHandleIMSReply().

This works either when the IUMS precondition is satisfied (then I send
200 to client, instead of 304 typically) or for the cache *hit only*
when the IUMS precondition is unsatisfied (then I send 412 to client,
instead of 200 typically).

However, when the IUMS precondition is unsatisfied upon cache *miss*,
the origin's 200 response is still being sent to client, even after I
modify the store entry memory objectâs reply status to 412 in
httpProcessReplyHeader().  I cannot figure out how and when the status
is being restored back to 200.

On MISS the client reply is passed through. There may be an IMS check there somewhere that need updating. The reply status should be updated at the point of either parsing the status line, or completed parsing the reply headers.


Iâve set gdb data-watch breakpoints over the store entry memory
objectâs reply status.  But then, later during the execution, gdb
reports watchpoint expression error: bad address.

Iâm stuck now, and would really appreciate any help.  Thanks.



Amos
--
Please be using
  Current Stable Squid 2.7.STABLE9 or 3.1.11
  Beta testers wanted for 3.2.0.5


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux