| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 if (!file->fileSystemURL().isEmpty()) | 123 if (!file->fileSystemURL().isEmpty()) |
| 124 formData->appendFileSystemURL(file->fileSystemURL()); | 124 formData->appendFileSystemURL(file->fileSystemURL()); |
| 125 } else { | 125 } else { |
| 126 formData->appendBlob(value.blob()->uuid(), value.blob()->blo
bDataHandle()); | 126 formData->appendBlob(value.blob()->uuid(), value.blob()->blo
bDataHandle()); |
| 127 } | 127 } |
| 128 } else { | 128 } else { |
| 129 formData->appendData(value.data().data(), value.data().length())
; | 129 formData->appendData(value.data().data(), value.data().length())
; |
| 130 } | 130 } |
| 131 formData->appendData("\r\n", 2); | 131 formData->appendData("\r\n", 2); |
| 132 } else { | 132 } else { |
| 133 // Omit the name "isindex" if it's the first form data element. | 133 FormDataBuilder::addKeyValuePairAsFormData(encodedData, key.data(),
value.data(), encodingType); |
| 134 // FIXME: Why is this a good rule? Is this obsolete now? | |
| 135 if (encodedData.isEmpty() && key.data() == "isindex") | |
| 136 FormDataBuilder::encodeStringAsFormData(encodedData, value.data(
)); | |
| 137 else | |
| 138 FormDataBuilder::addKeyValuePairAsFormData(encodedData, key.data
(), value.data(), encodingType); | |
| 139 } | 134 } |
| 140 } | 135 } |
| 141 | 136 |
| 142 if (isMultiPartForm) | 137 if (isMultiPartForm) |
| 143 FormDataBuilder::addBoundaryToMultiPartHeader(encodedData, formData->bou
ndary().data(), true); | 138 FormDataBuilder::addBoundaryToMultiPartHeader(encodedData, formData->bou
ndary().data(), true); |
| 144 | 139 |
| 145 formData->appendData(encodedData.data(), encodedData.size()); | 140 formData->appendData(encodedData.data(), encodedData.size()); |
| 146 } | 141 } |
| 147 | 142 |
| 148 } // namespace | 143 } // namespace |
| OLD | NEW |