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 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
639 void XMLHttpRequest::send(DOMFormData* body, ExceptionState& es) | 639 void XMLHttpRequest::send(DOMFormData* body, ExceptionState& es) |
640 { | 640 { |
641 if (!initSend(es)) | 641 if (!initSend(es)) |
642 return; | 642 return; |
643 | 643 |
644 if (areMethodAndURLValidForSend()) { | 644 if (areMethodAndURLValidForSend()) { |
645 m_requestEntityBody = FormData::createMultiPart(*(static_cast<FormDataLi
st*>(body)), body->encoding(), document()); | 645 m_requestEntityBody = FormData::createMultiPart(*(static_cast<FormDataLi
st*>(body)), body->encoding(), document()); |
646 | 646 |
647 String contentType = getRequestHeader("Content-Type"); | 647 String contentType = getRequestHeader("Content-Type"); |
648 if (contentType.isEmpty()) { | 648 if (contentType.isEmpty()) { |
649 contentType = String(ASCIILiteral("multipart/form-data; boundary="))
+ m_requestEntityBody->boundary().data(); | 649 contentType = String("multipart/form-data; boundary=") + m_requestEn
tityBody->boundary().data(); |
650 setRequestHeaderInternal("Content-Type", contentType); | 650 setRequestHeaderInternal("Content-Type", contentType); |
651 } | 651 } |
652 } | 652 } |
653 | 653 |
654 createRequest(es); | 654 createRequest(es); |
655 } | 655 } |
656 | 656 |
657 void XMLHttpRequest::send(ArrayBuffer* body, ExceptionState& es) | 657 void XMLHttpRequest::send(ArrayBuffer* body, ExceptionState& es) |
658 { | 658 { |
659 String consoleMessage("ArrayBuffer is deprecated in XMLHttpRequest.send(). U
se ArrayBufferView instead."); | 659 String consoleMessage("ArrayBuffer is deprecated in XMLHttpRequest.send(). U
se ArrayBufferView instead."); |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1250 { | 1250 { |
1251 return &m_eventTargetData; | 1251 return &m_eventTargetData; |
1252 } | 1252 } |
1253 | 1253 |
1254 EventTargetData* XMLHttpRequest::ensureEventTargetData() | 1254 EventTargetData* XMLHttpRequest::ensureEventTargetData() |
1255 { | 1255 { |
1256 return &m_eventTargetData; | 1256 return &m_eventTargetData; |
1257 } | 1257 } |
1258 | 1258 |
1259 } // namespace WebCore | 1259 } // namespace WebCore |
OLD | NEW |