| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "core/fetch/FetchUtils.h" | 5 #include "core/fetch/FetchUtils.h" |
| 6 | 6 |
| 7 #include "platform/HTTPNames.h" | 7 #include "platform/HTTPNames.h" |
| 8 #include "platform/network/HTTPHeaderMap.h" | 8 #include "platform/network/HTTPHeaderMap.h" |
| 9 #include "platform/network/HTTPParsers.h" | 9 #include "platform/network/HTTPParsers.h" |
| 10 #include "wtf/HashSet.h" | 10 #include "wtf/HashSet.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 "dnt", | 58 "dnt", |
| 59 "expect", | 59 "expect", |
| 60 "host", | 60 "host", |
| 61 "keep-alive", | 61 "keep-alive", |
| 62 "origin", | 62 "origin", |
| 63 "referer", | 63 "referer", |
| 64 "te", | 64 "te", |
| 65 "trailer", | 65 "trailer", |
| 66 "transfer-encoding", | 66 "transfer-encoding", |
| 67 "upgrade", | 67 "upgrade", |
| 68 "user-agent", | |
| 69 "via", | 68 "via", |
| 70 }; | 69 }; |
| 71 } | 70 } |
| 72 | 71 |
| 73 const ForbiddenHeaderNames& ForbiddenHeaderNames::get() | 72 const ForbiddenHeaderNames& ForbiddenHeaderNames::get() |
| 74 { | 73 { |
| 75 DEFINE_THREAD_SAFE_STATIC_LOCAL(const ForbiddenHeaderNames, instance, new Fo
rbiddenHeaderNames); | 74 DEFINE_THREAD_SAFE_STATIC_LOCAL(const ForbiddenHeaderNames, instance, new Fo
rbiddenHeaderNames); |
| 76 return instance; | 75 return instance; |
| 77 } | 76 } |
| 78 | 77 |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 String FetchUtils::normalizeHeaderValue(const String& value) | 208 String FetchUtils::normalizeHeaderValue(const String& value) |
| 210 { | 209 { |
| 211 // https://fetch.spec.whatwg.org/#concept-header-value-normalize | 210 // https://fetch.spec.whatwg.org/#concept-header-value-normalize |
| 212 // Strip leading and trailing whitespace from header value. | 211 // Strip leading and trailing whitespace from header value. |
| 213 // HTTP whitespace bytes are 0x09, 0x0A, 0x0D, and 0x20. | 212 // HTTP whitespace bytes are 0x09, 0x0A, 0x0D, and 0x20. |
| 214 | 213 |
| 215 return value.stripWhiteSpace(isHTTPWhitespace); | 214 return value.stripWhiteSpace(isHTTPWhitespace); |
| 216 } | 215 } |
| 217 | 216 |
| 218 } // namespace blink | 217 } // namespace blink |
| OLD | NEW |