| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org> | 3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org> |
| 4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org> | 4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org> |
| 5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved. | 5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved. |
| 6 * Copyright (C) 2012 Intel Corporation | 6 * Copyright (C) 2012 Intel Corporation |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 m_forbiddenRequestHeaders.add("via"); | 106 m_forbiddenRequestHeaders.add("via"); |
| 107 } | 107 } |
| 108 | 108 |
| 109 static bool isSetCookieHeader(const AtomicString& name) | 109 static bool isSetCookieHeader(const AtomicString& name) |
| 110 { | 110 { |
| 111 return equalIgnoringCase(name, "set-cookie") || equalIgnoringCase(name, "set
-cookie2"); | 111 return equalIgnoringCase(name, "set-cookie") || equalIgnoringCase(name, "set
-cookie2"); |
| 112 } | 112 } |
| 113 | 113 |
| 114 static void replaceCharsetInMediaType(String& mediaType, const String& charsetVa
lue) | 114 static void replaceCharsetInMediaType(String& mediaType, const String& charsetVa
lue) |
| 115 { | 115 { |
| 116 unsigned int pos = 0, len = 0; | 116 unsigned pos = 0, len = 0; |
| 117 | 117 |
| 118 findCharsetInMediaType(mediaType, pos, len); | 118 findCharsetInMediaType(mediaType, pos, len); |
| 119 | 119 |
| 120 if (!len) { | 120 if (!len) { |
| 121 // When no charset found, do nothing. | 121 // When no charset found, do nothing. |
| 122 return; | 122 return; |
| 123 } | 123 } |
| 124 | 124 |
| 125 // Found at least one existing charset, replace all occurrences with new cha
rset. | 125 // Found at least one existing charset, replace all occurrences with new cha
rset. |
| 126 while (len) { | 126 while (len) { |
| 127 mediaType.replace(pos, len, charsetValue); | 127 mediaType.replace(pos, len, charsetValue); |
| 128 unsigned int start = pos + charsetValue.length(); | 128 unsigned start = pos + charsetValue.length(); |
| 129 findCharsetInMediaType(mediaType, pos, len, start); | 129 findCharsetInMediaType(mediaType, pos, len, start); |
| 130 } | 130 } |
| 131 } | 131 } |
| 132 | 132 |
| 133 static const XMLHttpRequestStaticData* staticData = 0; | 133 static const XMLHttpRequestStaticData* staticData = 0; |
| 134 | 134 |
| 135 static const XMLHttpRequestStaticData* createXMLHttpRequestStaticData() | 135 static const XMLHttpRequestStaticData* createXMLHttpRequestStaticData() |
| 136 { | 136 { |
| 137 staticData = new XMLHttpRequestStaticData; | 137 staticData = new XMLHttpRequestStaticData; |
| 138 return staticData; | 138 return staticData; |
| (...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1393 return ActiveDOMObject::executionContext(); | 1393 return ActiveDOMObject::executionContext(); |
| 1394 } | 1394 } |
| 1395 | 1395 |
| 1396 void XMLHttpRequest::trace(Visitor* visitor) | 1396 void XMLHttpRequest::trace(Visitor* visitor) |
| 1397 { | 1397 { |
| 1398 visitor->trace(m_responseBlob); | 1398 visitor->trace(m_responseBlob); |
| 1399 visitor->trace(m_responseStream); | 1399 visitor->trace(m_responseStream); |
| 1400 } | 1400 } |
| 1401 | 1401 |
| 1402 } // namespace WebCore | 1402 } // namespace WebCore |
| OLD | NEW |