You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by kshri23 <gi...@git.apache.org> on 2016/08/18 02:18:42 UTC

[GitHub] trafficserver pull request #871: TS-4733: Skip modifying response length for...

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.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #871: TS-4733: Skip modifying response length for HEAD r...

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:

    https://github.com/apache/trafficserver/pull/871
  
    FreeBSD build *successful*! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/1378/ for details.
     



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #871: TS-4733: Skip modifying response length for HEAD r...

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:

    https://github.com/apache/trafficserver/pull/871
  
    Linux build *successful*! See https://ci.trafficserver.apache.org/job/Github-Linux/445/ for details.
     



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #871: TS-4733: Skip modifying response length for HEAD r...

Posted by zwoop <gi...@git.apache.org>.
Github user zwoop commented on the issue:

    https://github.com/apache/trafficserver/pull/871
  
    Does this replace the previous commits from TS-3828? The last comment is a little confusing, in that it sounds this would replace the previous commits?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #871: TS-4733: Skip modifying response length for HEAD r...

Posted by zwoop <gi...@git.apache.org>.
Github user zwoop commented on the issue:

    https://github.com/apache/trafficserver/pull/871
  
    [approve ci]


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #871: TS-4733: Skip modifying response length for HEAD r...

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:

    https://github.com/apache/trafficserver/pull/871
  
    Linux build *successful*! See https://ci.trafficserver.apache.org/job/Github-Linux/1271/ for details.
     



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request #871: TS-4733: Skip modifying response length for...

Posted by zwoop <gi...@git.apache.org>.
Github user zwoop commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/871#discussion_r75571646
  
    --- Diff: proxy/http/HttpTransact.cc ---
    @@ -8059,12 +8059,8 @@ HttpTransact::build_response(State *s, HTTPHdr *base_response, HTTPHdr *outgoing
     
       // If the response is prohibited from containing a body,
       //  we know the content length is trustable for keep-alive
    -  if (is_response_body_precluded(status_code, s->method)) {
    -    s->hdr_info.trust_response_cl       = true;
    -    s->hdr_info.response_content_length = 0;
    -    s->client_info.transfer_encoding    = HttpTransact::NO_TRANSFER_ENCODING;
    -    s->server_info.transfer_encoding    = HttpTransact::NO_TRANSFER_ENCODING;
    -  }
    +  if (is_response_body_precluded(status_code, s->method))
    --- End diff --
    
    Nit pick, but we shouldn't eliminate {} in conditionals, it's just a bad habit. Always use the format
    
        if ( ...) {
            // Stuff
        }
    
    even for single line conditionals.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request #871: TS-4733: Skip modifying response length for...

Posted by bryancall <gi...@git.apache.org>.
Github user bryancall commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/871#discussion_r97472812
  
    --- Diff: proxy/http/HttpTransact.cc ---
    @@ -8059,12 +8059,8 @@ HttpTransact::build_response(State *s, HTTPHdr *base_response, HTTPHdr *outgoing
     
       // If the response is prohibited from containing a body,
       //  we know the content length is trustable for keep-alive
    -  if (is_response_body_precluded(status_code, s->method)) {
    -    s->hdr_info.trust_response_cl       = true;
    -    s->hdr_info.response_content_length = 0;
    -    s->client_info.transfer_encoding    = HttpTransact::NO_TRANSFER_ENCODING;
    -    s->server_info.transfer_encoding    = HttpTransact::NO_TRANSFER_ENCODING;
    -  }
    +  if (is_response_body_precluded(status_code, s->method))
    --- End diff --
    
    I am going to commit as is.  There hasn't been an update on it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #871: TS-4733: Skip modifying response length for HEAD r...

Posted by kshri23 <gi...@git.apache.org>.
Github user kshri23 commented on the issue:

    https://github.com/apache/trafficserver/pull/871
  
    Yes, it does. I verified that by running the test submitted as part of that fix.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #871: TS-4733: Skip modifying response length for HEAD r...

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:

    https://github.com/apache/trafficserver/pull/871
  
    FreeBSD build *successful*! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/549/ for details.
     



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #871: TS-4733: Skip modifying response length for HEAD r...

Posted by bryancall <gi...@git.apache.org>.
Github user bryancall commented on the issue:

    https://github.com/apache/trafficserver/pull/871
  
    [approve ci]


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request #871: TS-4733: Skip modifying response length for...

Posted by bryancall <gi...@git.apache.org>.
Github user bryancall closed the pull request at:

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---