| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 155 |
| 156 // Returns true and stores the position of the end of the headers to |*end| | 156 // 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. | 157 // if the headers part ends in |bytes[0..size]|. Returns false otherwise. |
| 158 PLATFORM_EXPORT bool parseMultipartHeadersFromBody(const char* bytes, | 158 PLATFORM_EXPORT bool parseMultipartHeadersFromBody(const char* bytes, |
| 159 size_t, | 159 size_t, |
| 160 ResourceResponse*, | 160 ResourceResponse*, |
| 161 size_t* end); | 161 size_t* end); |
| 162 | 162 |
| 163 // Parses a header value containing JSON data, according to | 163 // Parses a header value containing JSON data, according to |
| 164 // https://tools.ietf.org/html/draft-ietf-httpbis-jfv-01 | 164 // https://tools.ietf.org/html/draft-ietf-httpbis-jfv-01 |
| 165 // Returns an empty unique_ptr if the header cannot be parsed as JSON. | 165 // Returns an empty unique_ptr if the header cannot be parsed as JSON. JSON |
| 166 PLATFORM_EXPORT std::unique_ptr<JSONArray> parseJSONHeader( | 166 // strings which represent object nested deeper than |maxParseDepth| will also |
| 167 const String& header); | 167 // cause an empty return value. |
| 168 PLATFORM_EXPORT std::unique_ptr<JSONArray> parseJSONHeader(const String& header, |
| 169 int maxParseDepth); |
| 168 | 170 |
| 169 } // namespace blink | 171 } // namespace blink |
| 170 | 172 |
| 171 #endif | 173 #endif |
| OLD | NEW |