| 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) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 4 * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
| 5 * Copyright (C) 2009 Google Inc. All rights reserved. | 5 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 6 * Copyright (C) 2011 Apple Inc. All Rights Reserved. | 6 * Copyright (C) 2011 Apple Inc. All Rights Reserved. |
| 7 * | 7 * |
| 8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
| 9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
| 10 * are met: | 10 * are met: |
| (...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 response->clearHTTPHeaderField(header); | 892 response->clearHTTPHeaderField(header); |
| 893 while (responseHeaders->EnumerateHeader(&iterator, headerStringPiece, | 893 while (responseHeaders->EnumerateHeader(&iterator, headerStringPiece, |
| 894 &value)) { | 894 &value)) { |
| 895 response->addHTTPHeaderField(header, WebString::fromLatin1(value)); | 895 response->addHTTPHeaderField(header, WebString::fromLatin1(value)); |
| 896 } | 896 } |
| 897 } | 897 } |
| 898 return true; | 898 return true; |
| 899 } | 899 } |
| 900 | 900 |
| 901 // See https://tools.ietf.org/html/draft-ietf-httpbis-jfv-01, Section 4. | 901 // See https://tools.ietf.org/html/draft-ietf-httpbis-jfv-01, Section 4. |
| 902 std::unique_ptr<JSONArray> parseJSONHeader(const String& header) { | 902 std::unique_ptr<JSONArray> parseJSONHeader(const String& header, |
| 903 int maxParseDepth) { |
| 903 StringBuilder sb; | 904 StringBuilder sb; |
| 904 sb.append("["); | 905 sb.append("["); |
| 905 sb.append(header); | 906 sb.append(header); |
| 906 sb.append("]"); | 907 sb.append("]"); |
| 907 std::unique_ptr<JSONValue> headerValue = parseJSON(sb.toString()); | 908 std::unique_ptr<JSONValue> headerValue = |
| 909 parseJSON(sb.toString(), maxParseDepth); |
| 908 return JSONArray::from(std::move(headerValue)); | 910 return JSONArray::from(std::move(headerValue)); |
| 909 } | 911 } |
| 910 | 912 |
| 911 } // namespace blink | 913 } // namespace blink |
| OLD | NEW |