From cb9f147e3c276d3a2135c25e8952f402933bc64a Mon Sep 17 00:00:00 2001 From: Johan Brichau Date: Sat, 13 Jan 2024 13:56:57 +0100 Subject: [PATCH] A part with an empty filename in multipart formdata should still be handled as a file --- .../GRPlatform.extension/instance/seasideVersion.st | 2 +- .../instance/convertMultipartEntity.with..st | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/repository/Seaside-Core.package/GRPlatform.extension/instance/seasideVersion.st b/repository/Seaside-Core.package/GRPlatform.extension/instance/seasideVersion.st index a4ec5f2c6..85d2361e9 100644 --- a/repository/Seaside-Core.package/GRPlatform.extension/instance/seasideVersion.st +++ b/repository/Seaside-Core.package/GRPlatform.extension/instance/seasideVersion.st @@ -2,5 +2,5 @@ seasideVersion "Answer the Seaside version" - ^ (GRVersion major: 3 minor: 5 revision: 4) + ^ (GRVersion major: 3 minor: 6 revision: 0) yourself \ No newline at end of file diff --git a/repository/Seaside-Zinc-Core.package/ZnZincServerAdaptor.class/instance/convertMultipartEntity.with..st b/repository/Seaside-Zinc-Core.package/ZnZincServerAdaptor.class/instance/convertMultipartEntity.with..st index cac3bb98b..344771cc7 100644 --- a/repository/Seaside-Zinc-Core.package/ZnZincServerAdaptor.class/instance/convertMultipartEntity.with..st +++ b/repository/Seaside-Zinc-Core.package/ZnZincServerAdaptor.class/instance/convertMultipartEntity.with..st @@ -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 ] \ No newline at end of file + part fileName + ifNil: [ self codec url decode: part fieldValueString ] + ifNotNil: [ self convertMultipartFileField: part ] ] + ifFalse: [ '' ]. + aMultiValueDictionary at: part fieldName add: value ] \ No newline at end of file