You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by shinya1020 <gi...@git.apache.org> on 2016/09/30 09:29:59 UTC

[GitHub] trafficserver pull request #1067: TS-4914: Fix response headers on 304 respo...

GitHub user shinya1020 opened a pull request:

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

    TS-4914: Fix response headers on 304 response

    https://issues.apache.org/jira/browse/TS-4914

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

    $ git pull https://github.com/shinya1020/trafficserver TS-4914

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

    https://github.com/apache/trafficserver/pull/1067.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 #1067
    
----
commit 2fddaeac7df63f71dd465d0e471fbdb999e99f22
Author: Shinya Kawano <sk...@yahoo-corp.jp>
Date:   2016-09-30T09:18:53Z

    TS-4914: Fix response headers on 304 response

----


---
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 #1067: TS-4914: Fix response headers on 304 response

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

    https://github.com/apache/trafficserver/pull/1067
  
    Mostly out of curiosity, is there a particular header here in the (limited) set of headers that is likely to have multi-values?


---
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 #1067: TS-4914: Fix response headers on 304 respo...

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

    https://github.com/apache/trafficserver/pull/1067#discussion_r97269280
  
    --- Diff: proxy/http/HttpTransact.cc ---
    @@ -7948,9 +7948,11 @@ HttpTransact::build_response(State *s, HTTPHdr *base_response, HTTPHdr *outgoing
                   const char *value;
     
                   field = base_response->field_find(fields[i].name, fields[i].len);
    -              ink_assert(field != nullptr);
    -              value = field->value_get(&len);
    -              outgoing_response->value_append(fields[i].name, fields[i].len, value, len, 0);
    +              while (field) {
    +                value = field->value_get(&len);
    +                outgoing_response->value_append(field_name[i], field_len[i], value, len, true);
    --- End diff --
    
    This fix can be applicable for Cache-Control header and some other headers but not for every headers.
    Please refer to the Note in [RFC7230 Section 3.2.2](https://tools.ietf.org/html/rfc7230#section-3.2.2). At least it's not applicable for Set-Cookie header.
    
    We might be able to have a blacklist / whitelist, but it won't be perfect list. Maybe, just sending all headers separately is a safer way?


---
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 #1067: TS-4914: Fix response headers on 304 response

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

    https://github.com/apache/trafficserver/pull/1067
  
    FreeBSD build *successful*! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/908/ 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 #1067: TS-4914: Fix response headers on 304 response

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

    https://github.com/apache/trafficserver/pull/1067
  
    [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 #1067: TS-4914: Fix response headers on 304 response

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

    https://github.com/apache/trafficserver/pull/1067
  
    Linux build *successful*! See https://ci.trafficserver.apache.org/job/Github-Linux/803/ 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 #1067: TS-4914: Fix response headers on 304 response

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

    https://github.com/apache/trafficserver/pull/1067
  
    In our production, some servers return multiple Cache-Control headers.
    
    For example, if the following configurations are applied to apache httpd
    ```
    Header always set Cache-Control "public"
    ExpiresActive On
    ExpiresDefault "access plus 1 days"
    ```
    then the server returns the following headers.
    ```
    Cache-Control: public
    Cache-Control: max-age=86400
    Expires: Tue, 04 Oct 2016 12:25:44 GMT
    ```


---
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.
---