You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Mohamad Khateeb (JIRA)" <ji...@apache.org> on 2013/09/09 16:43:52 UTC

[jira] [Commented] (TS-1086) Returning 304 response to unconditional request

    [ https://issues.apache.org/jira/browse/TS-1086?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13761893#comment-13761893 ] 

Mohamad Khateeb commented on TS-1086:
-------------------------------------

I have attached a patch for this issue .

the problem was , when ATS fails to get the cache write lock it changes to proxy mode , so when the object is stale and ATS has already made a conditional get to the server , ATS now must remove the conditional request headers that have been added by it .
the ATS just removes "If-Modified-Since" header from the request , but a conditional get made by ATS can also have "If-None-Match" header , if etag header is found in the cached response. 

The patch that I have attached is just checking if the "If-None-Match" header is added by ATS . If so remove it ,  if it's not in the original client request.
                
> Returning 304 response to unconditional request
> -----------------------------------------------
>
>                 Key: TS-1086
>                 URL: https://issues.apache.org/jira/browse/TS-1086
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: HTTP
>    Affects Versions: 3.0.1
>         Environment: Observed on Amazon/ec2 build, which is 3.0.1 on redhat-like linux.
>            Reporter: Nick Kew
>             Fix For: 4.2.0
>
>         Attachments: TS-1086.diff
>
>
> ab is reporting HTTP 304 responses to a small number of unconditional requests in a test run:
> GET /testfile.html HTTP/1.0^M
> Host: localhost^M
> User-Agent: ApacheBench/2.3^M
> Accept: */*^M
> ^M
> HTTP/1.0 304 Not Modified^M
> Date: Mon, 21 Nov 2011 14:23:48 GMT^M
> Server: ATS/3.0.1^M
> ETag: "5e24-24cd-4b23b69f6e89c"^M
> Cache-Control: max-age=60^M
> Age: 2^M
> ^M
> I presume what's happening is that trafficserver is sending a conditional request with If-Modified-Since to the origin server, and then returning the origin's 304 response to the client's unconditional request.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira