| 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 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 NETWORK_DVLOG(1) << this << " send() Blob " << body->uuid(); | 805 NETWORK_DVLOG(1) << this << " send() Blob " << body->uuid(); |
| 806 | 806 |
| 807 if (!initSend(exceptionState)) | 807 if (!initSend(exceptionState)) |
| 808 return; | 808 return; |
| 809 | 809 |
| 810 RefPtr<EncodedFormData> httpBody; | 810 RefPtr<EncodedFormData> httpBody; |
| 811 | 811 |
| 812 if (areMethodAndURLValidForSend()) { | 812 if (areMethodAndURLValidForSend()) { |
| 813 if (getRequestHeader(HTTPNames::Content_Type).isEmpty()) { | 813 if (getRequestHeader(HTTPNames::Content_Type).isEmpty()) { |
| 814 const String& blobType = body->type(); | 814 const String& blobType = body->type(); |
| 815 if (!blobType.isEmpty() && isValidContentType(blobType)) { | 815 if (!blobType.isEmpty() && ParsedContentType::isValid(blobType)) { |
| 816 setRequestHeaderInternal(HTTPNames::Content_Type, | 816 setRequestHeaderInternal(HTTPNames::Content_Type, |
| 817 AtomicString(blobType)); | 817 AtomicString(blobType)); |
| 818 } | 818 } |
| 819 } | 819 } |
| 820 | 820 |
| 821 // FIXME: add support for uploading bundles. | 821 // FIXME: add support for uploading bundles. |
| 822 httpBody = EncodedFormData::create(); | 822 httpBody = EncodedFormData::create(); |
| 823 if (body->hasBackingFile()) { | 823 if (body->hasBackingFile()) { |
| 824 File* file = toFile(body); | 824 File* file = toFile(body); |
| 825 if (!file->path().isEmpty()) | 825 if (!file->path().isEmpty()) |
| (...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1859 visitor->traceWrappers(m_responseDocument); | 1859 visitor->traceWrappers(m_responseDocument); |
| 1860 visitor->traceWrappers(m_responseArrayBuffer); | 1860 visitor->traceWrappers(m_responseArrayBuffer); |
| 1861 XMLHttpRequestEventTarget::traceWrappers(visitor); | 1861 XMLHttpRequestEventTarget::traceWrappers(visitor); |
| 1862 } | 1862 } |
| 1863 | 1863 |
| 1864 std::ostream& operator<<(std::ostream& ostream, const XMLHttpRequest* xhr) { | 1864 std::ostream& operator<<(std::ostream& ostream, const XMLHttpRequest* xhr) { |
| 1865 return ostream << "XMLHttpRequest " << static_cast<const void*>(xhr); | 1865 return ostream << "XMLHttpRequest " << static_cast<const void*>(xhr); |
| 1866 } | 1866 } |
| 1867 | 1867 |
| 1868 } // namespace blink | 1868 } // namespace blink |
| OLD | NEW |