OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 2 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
3 * Copyright (C) 2009 Google Inc. All rights reserved. | 3 * Copyright (C) 2009 Google Inc. All rights reserved. |
4 * Copyright (C) 2011 Apple Inc. All Rights Reserved. | 4 * Copyright (C) 2011 Apple Inc. All Rights Reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * | 9 * |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 26 matching lines...) Expand all Loading... |
37 #include "platform/wtf/Forward.h" | 37 #include "platform/wtf/Forward.h" |
38 #include "platform/wtf/HashSet.h" | 38 #include "platform/wtf/HashSet.h" |
39 #include "platform/wtf/Vector.h" | 39 #include "platform/wtf/Vector.h" |
40 #include "platform/wtf/text/StringHash.h" | 40 #include "platform/wtf/text/StringHash.h" |
41 | 41 |
42 #include <stdint.h> | 42 #include <stdint.h> |
43 #include <memory> | 43 #include <memory> |
44 | 44 |
45 namespace blink { | 45 namespace blink { |
46 | 46 |
| 47 class HTTPHeaderMap; |
47 class Suborigin; | 48 class Suborigin; |
48 class ResourceResponse; | 49 class ResourceResponse; |
49 | 50 |
50 enum ContentTypeOptionsDisposition { | 51 enum ContentTypeOptionsDisposition { |
51 kContentTypeOptionsNone, | 52 kContentTypeOptionsNone, |
52 kContentTypeOptionsNosniff | 53 kContentTypeOptionsNosniff |
53 }; | 54 }; |
54 | 55 |
55 // Be sure to update the behavior of | 56 // Be sure to update the behavior of |
56 // XSSAuditor::combineXSSProtectionHeaderAndCSP whenever you change this enum's | 57 // XSSAuditor::combineXSSProtectionHeaderAndCSP whenever you change this enum's |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 // may be Strings in |messages|. | 142 // may be Strings in |messages|. |
142 PLATFORM_EXPORT bool ParseSuboriginHeader(const String& header, | 143 PLATFORM_EXPORT bool ParseSuboriginHeader(const String& header, |
143 Suborigin*, | 144 Suborigin*, |
144 WTF::Vector<String>& messages); | 145 WTF::Vector<String>& messages); |
145 | 146 |
146 PLATFORM_EXPORT ContentTypeOptionsDisposition | 147 PLATFORM_EXPORT ContentTypeOptionsDisposition |
147 ParseContentTypeOptionsHeader(const String& header); | 148 ParseContentTypeOptionsHeader(const String& header); |
148 | 149 |
149 // Returns true and stores the position of the end of the headers to |*end| | 150 // Returns true and stores the position of the end of the headers to |*end| |
150 // if the headers part ends in |bytes[0..size]|. Returns false otherwise. | 151 // if the headers part ends in |bytes[0..size]|. Returns false otherwise. |
| 152 PLATFORM_EXPORT bool ParseMultipartFormHeadersFromBody( |
| 153 const char* bytes, |
| 154 size_t, |
| 155 HTTPHeaderMap* header_fields, |
| 156 size_t* end); |
| 157 |
| 158 // Returns true and stores the position of the end of the headers to |*end| |
| 159 // if the headers part ends in |bytes[0..size]|. Returns false otherwise. |
151 PLATFORM_EXPORT bool ParseMultipartHeadersFromBody(const char* bytes, | 160 PLATFORM_EXPORT bool ParseMultipartHeadersFromBody(const char* bytes, |
152 size_t, | 161 size_t, |
153 ResourceResponse*, | 162 ResourceResponse*, |
154 size_t* end); | 163 size_t* end); |
155 | 164 |
156 // Parses a header value containing JSON data, according to | 165 // Parses a header value containing JSON data, according to |
157 // https://tools.ietf.org/html/draft-ietf-httpbis-jfv-01 | 166 // https://tools.ietf.org/html/draft-ietf-httpbis-jfv-01 |
158 // Returns an empty unique_ptr if the header cannot be parsed as JSON. JSON | 167 // Returns an empty unique_ptr if the header cannot be parsed as JSON. JSON |
159 // strings which represent object nested deeper than |maxParseDepth| will also | 168 // strings which represent object nested deeper than |maxParseDepth| will also |
160 // cause an empty return value. | 169 // cause an empty return value. |
(...skipping 13 matching lines...) Expand all Loading... |
174 int64_t* instance_length); | 183 int64_t* instance_length); |
175 | 184 |
176 PLATFORM_EXPORT std::unique_ptr<ServerTimingHeaderVector> | 185 PLATFORM_EXPORT std::unique_ptr<ServerTimingHeaderVector> |
177 ParseServerTimingHeader(const String&); | 186 ParseServerTimingHeader(const String&); |
178 | 187 |
179 PLATFORM_EXPORT String CheckDoubleQuotedString(const String&); | 188 PLATFORM_EXPORT String CheckDoubleQuotedString(const String&); |
180 | 189 |
181 } // namespace blink | 190 } // namespace blink |
182 | 191 |
183 #endif | 192 #endif |
OLD | NEW |