| 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 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 } | 694 } |
| 695 | 695 |
| 696 void XMLHttpRequest::send(DOMFormData* body, ExceptionState& es) | 696 void XMLHttpRequest::send(DOMFormData* body, ExceptionState& es) |
| 697 { | 697 { |
| 698 LOG(Network, "XMLHttpRequest %p send() DOMFormData %p", this, body); | 698 LOG(Network, "XMLHttpRequest %p send() DOMFormData %p", this, body); |
| 699 | 699 |
| 700 if (!initSend(es)) | 700 if (!initSend(es)) |
| 701 return; | 701 return; |
| 702 | 702 |
| 703 if (areMethodAndURLValidForSend()) { | 703 if (areMethodAndURLValidForSend()) { |
| 704 m_requestEntityBody = FormData::createMultiPart(*(static_cast<FormDataLi
st*>(body)), body->encoding()); | 704 m_requestEntityBody = body->createMultiPartFormData(body->encoding()); |
| 705 | 705 |
| 706 String contentType = getRequestHeader("Content-Type"); | 706 String contentType = getRequestHeader("Content-Type"); |
| 707 if (contentType.isEmpty()) { | 707 if (contentType.isEmpty()) { |
| 708 contentType = String("multipart/form-data; boundary=") + m_requestEn
tityBody->boundary().data(); | 708 contentType = String("multipart/form-data; boundary=") + m_requestEn
tityBody->boundary().data(); |
| 709 setRequestHeaderInternal("Content-Type", contentType); | 709 setRequestHeaderInternal("Content-Type", contentType); |
| 710 } | 710 } |
| 711 } | 711 } |
| 712 | 712 |
| 713 createRequest(es); | 713 createRequest(es); |
| 714 } | 714 } |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1374 { | 1374 { |
| 1375 return EventTargetNames::XMLHttpRequest; | 1375 return EventTargetNames::XMLHttpRequest; |
| 1376 } | 1376 } |
| 1377 | 1377 |
| 1378 ExecutionContext* XMLHttpRequest::executionContext() const | 1378 ExecutionContext* XMLHttpRequest::executionContext() const |
| 1379 { | 1379 { |
| 1380 return ActiveDOMObject::executionContext(); | 1380 return ActiveDOMObject::executionContext(); |
| 1381 } | 1381 } |
| 1382 | 1382 |
| 1383 } // namespace WebCore | 1383 } // namespace WebCore |
| OLD | NEW |