Commit c76f4745 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

bug 1505752 - fix whitespace trim of Timing-Allow-Origin header value r=dragana

StripWhitespace() is not suitable for HTTP whitespace trimming.

Differential Revision: https://phabricator.services.mozilla.com/D11317

--HG--
extra : moz-landing-system : lando
parent 4d97ed04
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4142,7 +4142,7 @@ HttpBaseChannel::TimingAllowCheck(nsIPrincipal *aOrigin, bool *_retval)
    if (t.Type() == Tokenizer::TOKEN_EOF ||
        t.Equals(Tokenizer::Token::Char(','))) {
      p.Claim(headerItem);
      headerItem.StripWhitespace();
      nsHttp::TrimHTTPWhitespace(headerItem, headerItem);
      // If the list item contains a case-sensitive match for the value of the
      // origin, or a wildcard, return pass
      if (headerItem == origin || headerItem == "*") {