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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 if (!blobType.isEmpty() && isValidContentType(blobType)) | 677 if (!blobType.isEmpty() && isValidContentType(blobType)) |
678 setRequestHeaderInternal("Content-Type", blobType); | 678 setRequestHeaderInternal("Content-Type", blobType); |
679 else { | 679 else { |
680 // From FileAPI spec, whenever media type cannot be determined,
empty string must be returned. | 680 // From FileAPI spec, whenever media type cannot be determined,
empty string must be returned. |
681 setRequestHeaderInternal("Content-Type", ""); | 681 setRequestHeaderInternal("Content-Type", ""); |
682 } | 682 } |
683 } | 683 } |
684 | 684 |
685 // FIXME: add support for uploading bundles. | 685 // FIXME: add support for uploading bundles. |
686 m_requestEntityBody = FormData::create(); | 686 m_requestEntityBody = FormData::create(); |
687 if (body->isFile()) | 687 if (body->hasBackingFile()) |
688 m_requestEntityBody->appendFile(toFile(body)->path()); | 688 m_requestEntityBody->appendFile(toFile(body)->path()); |
689 else | 689 else |
690 m_requestEntityBody->appendBlob(body->uuid(), body->blobDataHandle()
); | 690 m_requestEntityBody->appendBlob(body->uuid(), body->blobDataHandle()
); |
691 } | 691 } |
692 | 692 |
693 createRequest(es); | 693 createRequest(es); |
694 } | 694 } |
695 | 695 |
696 void XMLHttpRequest::send(DOMFormData* body, ExceptionState& es) | 696 void XMLHttpRequest::send(DOMFormData* body, ExceptionState& es) |
697 { | 697 { |
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1366 { | 1366 { |
1367 return EventTargetNames::XMLHttpRequest; | 1367 return EventTargetNames::XMLHttpRequest; |
1368 } | 1368 } |
1369 | 1369 |
1370 ExecutionContext* XMLHttpRequest::executionContext() const | 1370 ExecutionContext* XMLHttpRequest::executionContext() const |
1371 { | 1371 { |
1372 return ActiveDOMObject::executionContext(); | 1372 return ActiveDOMObject::executionContext(); |
1373 } | 1373 } |
1374 | 1374 |
1375 } // namespace WebCore | 1375 } // namespace WebCore |
OLD | NEW |