mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 907428 - Include the file path in the 'filename' field in the MIME headers for files in multipart form submissions. r=sicking
This commit is contained in:
parent
45037ed8c8
commit
97b5d660ad
@ -470,6 +470,13 @@ nsFSMultipartFormData::AddNameFilePair(const nsAString& aName,
|
||||
|
||||
if (filename16.IsEmpty()) {
|
||||
filename16.AssignLiteral("blob");
|
||||
} else {
|
||||
nsAutoString filepath16;
|
||||
rv = file->GetPath(filepath16);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (!filepath16.IsEmpty()) {
|
||||
filename16 = filepath16 + NS_LITERAL_STRING("/") + filename16;
|
||||
}
|
||||
}
|
||||
|
||||
rv = EncodeVal(filename16, filename, true);
|
||||
|
Loading…
Reference in New Issue
Block a user