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

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

                Author: ASF GitHub Bot
            Created on: 01/Sep/16 20:44
            Start Date: 01/Sep/16 20:44
    Worklog Time Spent: 10m 
      Work Description: Github user jpeach commented on a diff in the pull 
request:

    https://github.com/apache/trafficserver/pull/951#discussion_r77249993
  
    --- Diff: plugins/header_rewrite/parser.cc ---
    @@ -50,6 +52,12 @@ Parser::Parser(const std::string &line) : _cond(false), 
_empty(false)
             _tokens.push_back(std::string(1, line[i]));
           }
           continue; /* always eat whitespace */
    +    } else if (line[i] == '\\') {
    +      // erase a backslash in quoted-string
    +      if (inquote && extracting_token) {
    --- End diff --
    
    Why the ``inquote`` condition? Why can't backquotes work outside of a 
quoted string?


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

    Worklog Id:     (was: 27803)
    Time Spent: 40m  (was: 0.5h)

> Backslash-escape is not allowed in rewriting rules
> --------------------------------------------------
>
>                 Key: TS-4797
>                 URL: https://issues.apache.org/jira/browse/TS-4797
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Plugins
>            Reporter: Masaori Koshiba
>             Fix For: 7.0.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> I noticed that backslash-escape in quoted-string is not allowed in 
> header-rewrite plugin rules. IIRC, this is allowed in 5.3.x.
> e.g.
> {noformat}
> cond %{SEND_RESPONSE_HDR_HOOK}
> add-header Public-Key-Pins 
> "pin-sha256=\"UgXZQmS15cJoBeWTvbmCE+PGw5/oHV00e+MMyuXr0YQ=\"; 
> pin-sha256=\"eYKlKmvqHnR4CsglcYuNzvro7rrmFINrje5nSAxnEsc=\"; max-age=600; 
> includeSubDomains" [L]
> {noformat}
> I got below error
> {noformat}
> 20160830.16h19m34s [header_rewrite] malformed line "add-header 
> Public-Key-Pins "pin-sha256=\"UgXZQmS15cJoBeWTvbmCE+PGw5/oHV00e+MMyuXr0YQ=\"; 
> pin-sha256=\"eYKlKmvqHnR4CsglcYuNzvro7rrmFINrje5nSAxnEsc=\"; max-age=600; 
> includeSubDomains" [L]" ignoring...
> {noformat}



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

Reply via email to