Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/network/HeaderFieldTokenizer.h" | 5 #include "platform/network/HeaderFieldTokenizer.h" |
| 6 | 6 |
| 7 #include "platform/wtf/text/StringBuilder.h" | 7 #include "platform/wtf/text/StringBuilder.h" |
| 8 #include "platform/wtf/text/StringView.h" | 8 #include "platform/wtf/text/StringView.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 111 return ConsumeQuotedString(output); | 111 return ConsumeQuotedString(output); |
| 112 | 112 |
| 113 StringView view; | 113 StringView view; |
| 114 if (!ConsumeToken(mode, view)) | 114 if (!ConsumeToken(mode, view)) |
| 115 return false; | 115 return false; |
| 116 output = view.ToString(); | 116 output = view.ToString(); |
| 117 return true; | 117 return true; |
| 118 } | 118 } |
| 119 | 119 |
| 120 void HeaderFieldTokenizer::SkipSpaces() { | 120 void HeaderFieldTokenizer::SkipSpaces() { |
| 121 while (!IsConsumed() && input_[index_] == ' ') | 121 while (!IsConsumed() && (input_[index_] == ' ' || input_[index_] == '\t')) |
|
Mike West
2017/06/09 08:13:44
Hrm. On the one hand, sure, let's skip tabs. On th
| |
| 122 ++index_; | 122 ++index_; |
| 123 } | 123 } |
| 124 | 124 |
| 125 } // namespace blink | 125 } // namespace blink |
| OLD | NEW |