From 6003bc7844d5fd70bea21f5a0773a9de71d99771 Mon Sep 17 00:00:00 2001 From: Johan Brichau Date: Tue, 2 Jan 2024 21:26:54 +0100 Subject: [PATCH] Fix: incorrect server configuration for streaming uploads --- .../instance/contentsDecodedUsing..st | 0 .../instance/configureServerForBinaryReading.st | 4 ++-- .../ZnZincServerAdaptor.class/instance/requestFieldsFor..st | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-) rename repository/Seaside-Core.package/{WAFile.class => WAAbstractFile.class}/instance/contentsDecodedUsing..st (100%) diff --git a/repository/Seaside-Core.package/WAFile.class/instance/contentsDecodedUsing..st b/repository/Seaside-Core.package/WAAbstractFile.class/instance/contentsDecodedUsing..st similarity index 100% rename from repository/Seaside-Core.package/WAFile.class/instance/contentsDecodedUsing..st rename to repository/Seaside-Core.package/WAAbstractFile.class/instance/contentsDecodedUsing..st diff --git a/repository/Seaside-Zinc-Core.package/ZnZincServerAdaptor.class/instance/configureServerForBinaryReading.st b/repository/Seaside-Zinc-Core.package/ZnZincServerAdaptor.class/instance/configureServerForBinaryReading.st index 6df7b2c5f..07eb8d7e4 100644 --- a/repository/Seaside-Zinc-Core.package/ZnZincServerAdaptor.class/instance/configureServerForBinaryReading.st +++ b/repository/Seaside-Zinc-Core.package/ZnZincServerAdaptor.class/instance/configureServerForBinaryReading.st @@ -3,5 +3,5 @@ configureServerForBinaryReading "Seaside wants to do its own text conversions" server reader: (server streamUploads - ifTrue: [ [ :stream | ZnRequest readBinaryFrom: stream ] ] - ifFalse: [ [ :stream | ZnRequest readStreamingFrom: stream ] ]) \ No newline at end of file + ifTrue: [ [ :stream | ZnRequest readStreamingFrom: stream ] ] + ifFalse: [ [ :stream | ZnRequest readBinaryFrom: stream ] ]) \ No newline at end of file diff --git a/repository/Seaside-Zinc-Core.package/ZnZincServerAdaptor.class/instance/requestFieldsFor..st b/repository/Seaside-Zinc-Core.package/ZnZincServerAdaptor.class/instance/requestFieldsFor..st index bdb11f19b..3b4eb7835 100644 --- a/repository/Seaside-Zinc-Core.package/ZnZincServerAdaptor.class/instance/requestFieldsFor..st +++ b/repository/Seaside-Zinc-Core.package/ZnZincServerAdaptor.class/instance/requestFieldsFor..st @@ -5,15 +5,13 @@ requestFieldsFor: aZincRequest fields := WARequestFields new. (aZincRequest method = #POST and: [ aZincRequest hasEntity ]) ifTrue: [ - (aZincRequest entity contentType matches: - ZnMimeType applicationFormUrlEncoded) ifTrue: [ + (aZincRequest entity contentType matches: ZnMimeType applicationFormUrlEncoded) ifTrue: [ fields addAll: (aZincRequest entity class = ZnStreamingEntity ifTrue: [ ZnApplicationFormUrlEncodedEntity new readFrom: aZincRequest entity stream; fields ] ifFalse: [ aZincRequest entity fields ]) ]. - (aZincRequest entity contentType matches: - ZnMimeType multiPartFormData) ifTrue: [ + (aZincRequest entity contentType matches: ZnMimeType multiPartFormData) ifTrue: [ fields addAll: (self convertMultipart: aZincRequest entity) ] ]. ^ fields \ No newline at end of file