Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1048)

Side by Side Diff: third_party/WebKit/Source/platform/network/HeaderFieldTokenizer.cpp

Issue 2889033002: Better header value parsing for Server-Timing. (Closed)
Patch Set: init duration as 0.0 Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/network/HTTPParsersTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 // TODO(cvazac) skip tabs, per:
122 // https://tools.ietf.org/html/rfc7230#section-3.2.3
121 while (!IsConsumed() && input_[index_] == ' ') 123 while (!IsConsumed() && input_[index_] == ' ')
122 ++index_; 124 ++index_;
123 } 125 }
124 126
125 } // namespace blink 127 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/network/HTTPParsersTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698