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 25 matching lines...) Expand all Loading... |
36 #include "wtf/Allocator.h" | 36 #include "wtf/Allocator.h" |
37 #include "wtf/Forward.h" | 37 #include "wtf/Forward.h" |
38 #include "wtf/HashSet.h" | 38 #include "wtf/HashSet.h" |
39 #include "wtf/Vector.h" | 39 #include "wtf/Vector.h" |
40 #include "wtf/text/StringHash.h" | 40 #include "wtf/text/StringHash.h" |
41 | 41 |
42 #include <memory> | 42 #include <memory> |
43 | 43 |
44 namespace blink { | 44 namespace blink { |
45 | 45 |
| 46 class HTTPHeaderMap; |
46 class Suborigin; | 47 class Suborigin; |
47 class ResourceResponse; | 48 class ResourceResponse; |
48 | 49 |
49 typedef enum { | 50 typedef enum { |
50 ContentDispositionNone, | 51 ContentDispositionNone, |
51 ContentDispositionInline, | 52 ContentDispositionInline, |
52 ContentDispositionAttachment, | 53 ContentDispositionAttachment, |
53 ContentDispositionOther | 54 ContentDispositionOther |
54 } ContentDispositionType; | 55 } ContentDispositionType; |
55 | 56 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 // may be Strings in |messages|. | 149 // may be Strings in |messages|. |
149 PLATFORM_EXPORT bool parseSuboriginHeader(const String& header, | 150 PLATFORM_EXPORT bool parseSuboriginHeader(const String& header, |
150 Suborigin*, | 151 Suborigin*, |
151 WTF::Vector<String>& messages); | 152 WTF::Vector<String>& messages); |
152 | 153 |
153 PLATFORM_EXPORT ContentTypeOptionsDisposition | 154 PLATFORM_EXPORT ContentTypeOptionsDisposition |
154 parseContentTypeOptionsHeader(const String& header); | 155 parseContentTypeOptionsHeader(const String& header); |
155 | 156 |
156 // Returns true and stores the position of the end of the headers to |*end| | 157 // Returns true and stores the position of the end of the headers to |*end| |
157 // if the headers part ends in |bytes[0..size]|. Returns false otherwise. | 158 // if the headers part ends in |bytes[0..size]|. Returns false otherwise. |
| 159 PLATFORM_EXPORT bool parseMultipartFormHeadersFromBody( |
| 160 const char* bytes, |
| 161 size_t, |
| 162 HTTPHeaderMap* headerFields, |
| 163 size_t* end); |
| 164 |
| 165 // Returns true and stores the position of the end of the headers to |*end| |
| 166 // if the headers part ends in |bytes[0..size]|. Returns false otherwise. |
158 PLATFORM_EXPORT bool parseMultipartHeadersFromBody(const char* bytes, | 167 PLATFORM_EXPORT bool parseMultipartHeadersFromBody(const char* bytes, |
159 size_t, | 168 size_t, |
160 ResourceResponse*, | 169 ResourceResponse*, |
161 size_t* end); | 170 size_t* end); |
162 | 171 |
163 // Parses a header value containing JSON data, according to | 172 // Parses a header value containing JSON data, according to |
164 // https://tools.ietf.org/html/draft-ietf-httpbis-jfv-01 | 173 // https://tools.ietf.org/html/draft-ietf-httpbis-jfv-01 |
165 // Returns an empty unique_ptr if the header cannot be parsed as JSON. JSON | 174 // Returns an empty unique_ptr if the header cannot be parsed as JSON. JSON |
166 // strings which represent object nested deeper than |maxParseDepth| will also | 175 // strings which represent object nested deeper than |maxParseDepth| will also |
167 // cause an empty return value. | 176 // cause an empty return value. |
168 PLATFORM_EXPORT std::unique_ptr<JSONArray> parseJSONHeader(const String& header, | 177 PLATFORM_EXPORT std::unique_ptr<JSONArray> parseJSONHeader(const String& header, |
169 int maxParseDepth); | 178 int maxParseDepth); |
170 | 179 |
171 } // namespace blink | 180 } // namespace blink |
172 | 181 |
173 #endif | 182 #endif |
OLD | NEW |