-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A part with an empty filename in multipart formdata should still be h…
…andled as a file
- Loading branch information
Showing
2 changed files
with
7 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 6 additions & 7 deletions
13
...side-Zinc-Core.package/ZnZincServerAdaptor.class/instance/convertMultipartEntity.with..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
private | ||
convertMultipartEntity: anEntity with: aMultiValueDictionary | ||
|
||
anEntity partsDo: [ :part | | ||
| value | | ||
value := part hasEntity | ||
ifFalse: [ '' ] | ||
ifTrue: [ | ||
part fileName isEmptyOrNil | ||
ifTrue: [ self codec url decode: part fieldValueString ] | ||
ifFalse: [ self convertMultipartFileField: part ] ]. | ||
aMultiValueDictionary | ||
at: part fieldName | ||
add: value ] | ||
part fileName | ||
ifNil: [ self codec url decode: part fieldValueString ] | ||
ifNotNil: [ self convertMultipartFileField: part ] ] | ||
ifFalse: [ '' ]. | ||
aMultiValueDictionary at: part fieldName add: value ] |