mirror of https://github.com/adamdruppe/arsd.git
multiple files
This commit is contained in:
parent
64284c3d7c
commit
3e0a280551
13
cgi.d
13
cgi.d
|
@ -365,7 +365,8 @@ class Cgi {
|
||||||
|
|
||||||
onRequestBodyDataReceived(amountReceived, originalContentLength);
|
onRequestBodyDataReceived(amountReceived, originalContentLength);
|
||||||
postArray = assumeUnique(pps._post);
|
postArray = assumeUnique(pps._post);
|
||||||
files = assumeUnique(pps._files);
|
filesArray = assumeUnique(pps._files);
|
||||||
|
files = keepLastOf(filesArray);
|
||||||
post = keepLastOf(postArray);
|
post = keepLastOf(postArray);
|
||||||
cleanUpPostDataState();
|
cleanUpPostDataState();
|
||||||
}
|
}
|
||||||
|
@ -994,6 +995,16 @@ class Cgi {
|
||||||
return assumeUnique(ca);
|
return assumeUnique(ca);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME duplication
|
||||||
|
private immutable(UploadedFile[string]) keepLastOf(in UploadedFile[][string] arr) {
|
||||||
|
UploadedFile[string] ca;
|
||||||
|
foreach(k, v; arr)
|
||||||
|
ca[k] = v[$-1];
|
||||||
|
|
||||||
|
return assumeUnique(ca);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private immutable(string[][string]) getCookieArray() {
|
private immutable(string[][string]) getCookieArray() {
|
||||||
auto forTheLoveOfGod = decodeVariables(cookie, "; ");
|
auto forTheLoveOfGod = decodeVariables(cookie, "; ");
|
||||||
return assumeUnique(forTheLoveOfGod);
|
return assumeUnique(forTheLoveOfGod);
|
||||||
|
|
Loading…
Reference in New Issue