You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/08/18 02:19:20 UTC

[jira] [Work logged] (TS-4733) Cache writes fail when client requests IMS and server replies 200

     [ https://issues.apache.org/jira/browse/TS-4733?focusedWorklogId=26561&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-26561 ]

ASF GitHub Bot logged work on TS-4733:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 18/Aug/16 02:18
            Start Date: 18/Aug/16 02:18
    Worklog Time Spent: 10m 
      Work Description: GitHub user kshri23 opened a pull request:

    https://github.com/apache/trafficserver/pull/871

    TS-4733: Skip modifying response length for HEAD response

    When we get a response to a HEAD request and if the response header
    has a 'CHUNKED' header we set the response length to undefined. We
    shouldn't be doing that because that length is used later to send the
    response to client.
    This fixes TS-3828 in a different way.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kshri23/trafficserver fix_4733

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafficserver/pull/871.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #871
    
----
commit 8811c02da0d8b36305ebd11102cd95ce9209e5c4
Author: Shrihari Kalkar <ks...@hotmail.com>
Date:   2016-08-18T02:07:54Z

    Skip modifying response length for HEAD response
    
    When we get a response to a HEAD request and if the response header
    has a 'CHUNKED' header we set the response length to undefined. We
    shouldn't be doing that because that length is used later to send the
    response to client.

----


Issue Time Tracking
-------------------

            Worklog Id:     (was: 26561)
            Time Spent: 10m
    Remaining Estimate: 0h

> Cache writes fail when client requests IMS and server replies 200
> -----------------------------------------------------------------
>
>                 Key: TS-4733
>                 URL: https://issues.apache.org/jira/browse/TS-4733
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 6.2.0
>            Reporter: Shrihari
>             Fix For: 7.0.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> I think this issue happens because of a fix applied in issue TS-3828.
> Imagine a case where the client requests 'IMS' and the cache doesn't have the URL. In that case, we remove the IMS and send the request to origin server. On receiving the response back, we send 304 to client and THEN write to cache.
> However, when we build 304 response to client, we set s->hdr_info.response_content_length = 0.
> Since this call to build_response happens before we setup a tunnel to write the data from 'http_server' to 'cache' we lose this information.
> While setting up this tunnel, we rely on the above field to get the size to write. However, since we have already zeroed it out we don't write anything to the cache.
> I verified that if I use length from the server_response instead of using the pre-computed one, it solves the problem. Though, I am not sure if that should be the solution. I am still looking into the code to see what is the right thing to do.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)