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

Side by Side Diff: third_party/WebKit/Source/platform/network/HTTPParsers.h

Issue 2292763002: [Fetch API] Implement Request.formData and Response.formData. (Closed)
Patch Set: More global-interface-listing*-expected.txt, urlencoded-parser-expected.txt Created 3 years, 7 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
OLDNEW
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 27 matching lines...) Expand all
38 #include "platform/wtf/Forward.h" 38 #include "platform/wtf/Forward.h"
39 #include "platform/wtf/HashSet.h" 39 #include "platform/wtf/HashSet.h"
40 #include "platform/wtf/Vector.h" 40 #include "platform/wtf/Vector.h"
41 #include "platform/wtf/text/StringHash.h" 41 #include "platform/wtf/text/StringHash.h"
42 42
43 #include <stdint.h> 43 #include <stdint.h>
44 #include <memory> 44 #include <memory>
45 45
46 namespace blink { 46 namespace blink {
47 47
48 class HTTPHeaderMap;
48 class Suborigin; 49 class Suborigin;
49 class ResourceResponse; 50 class ResourceResponse;
50 51
51 enum ContentTypeOptionsDisposition { 52 enum ContentTypeOptionsDisposition {
52 kContentTypeOptionsNone, 53 kContentTypeOptionsNone,
53 kContentTypeOptionsNosniff 54 kContentTypeOptionsNosniff
54 }; 55 };
55 56
56 // Be sure to update the behavior of 57 // Be sure to update the behavior of
57 // XSSAuditor::combineXSSProtectionHeaderAndCSP whenever you change this enum's 58 // XSSAuditor::combineXSSProtectionHeaderAndCSP whenever you change this enum's
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // may be Strings in |messages|. 143 // may be Strings in |messages|.
143 PLATFORM_EXPORT bool ParseSuboriginHeader(const String& header, 144 PLATFORM_EXPORT bool ParseSuboriginHeader(const String& header,
144 Suborigin*, 145 Suborigin*,
145 WTF::Vector<String>& messages); 146 WTF::Vector<String>& messages);
146 147
147 PLATFORM_EXPORT ContentTypeOptionsDisposition 148 PLATFORM_EXPORT ContentTypeOptionsDisposition
148 ParseContentTypeOptionsHeader(const String& header); 149 ParseContentTypeOptionsHeader(const String& header);
149 150
150 // Returns true and stores the position of the end of the headers to |*end| 151 // Returns true and stores the position of the end of the headers to |*end|
151 // if the headers part ends in |bytes[0..size]|. Returns false otherwise. 152 // if the headers part ends in |bytes[0..size]|. Returns false otherwise.
153 PLATFORM_EXPORT bool ParseMultipartFormHeadersFromBody(
154 const char* bytes,
155 size_t,
156 HTTPHeaderMap* header_fields,
157 size_t* end);
158
159 // Returns true and stores the position of the end of the headers to |*end|
160 // if the headers part ends in |bytes[0..size]|. Returns false otherwise.
152 PLATFORM_EXPORT bool ParseMultipartHeadersFromBody(const char* bytes, 161 PLATFORM_EXPORT bool ParseMultipartHeadersFromBody(const char* bytes,
153 size_t, 162 size_t,
154 ResourceResponse*, 163 ResourceResponse*,
155 size_t* end); 164 size_t* end);
156 165
157 // Parses a header value containing JSON data, according to 166 // Parses a header value containing JSON data, according to
158 // https://tools.ietf.org/html/draft-ietf-httpbis-jfv-01 167 // https://tools.ietf.org/html/draft-ietf-httpbis-jfv-01
159 // Returns an empty unique_ptr if the header cannot be parsed as JSON. JSON 168 // Returns an empty unique_ptr if the header cannot be parsed as JSON. JSON
160 // strings which represent object nested deeper than |maxParseDepth| will also 169 // strings which represent object nested deeper than |maxParseDepth| will also
161 // cause an empty return value. 170 // cause an empty return value.
(...skipping 23 matching lines...) Expand all
185 PLATFORM_EXPORT bool ConsumeQuotedString(const String&, unsigned&, String&); 194 PLATFORM_EXPORT bool ConsumeQuotedString(const String&, unsigned&, String&);
186 PLATFORM_EXPORT bool ConsumeTokenOrQuotedString(Mode, 195 PLATFORM_EXPORT bool ConsumeTokenOrQuotedString(Mode,
187 const String&, 196 const String&,
188 unsigned&, 197 unsigned&,
189 String&); 198 String&);
190 PLATFORM_EXPORT bool IsEnd(const String&, unsigned); 199 PLATFORM_EXPORT bool IsEnd(const String&, unsigned);
191 200
192 } // namespace blink 201 } // namespace blink
193 202
194 #endif 203 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/fetch/Response.cpp ('k') | third_party/WebKit/Source/platform/network/HTTPParsers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698