-
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.
Merge pull request #1406 from SeasideSt/fix-streaming-uploads-setting
Fix streaming uploads
- Loading branch information
Showing
8 changed files
with
50 additions
and
24 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
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 |
---|---|---|
|
@@ -3,4 +3,4 @@ do: aBlock | |
1 | ||
to: self size | ||
do: [ :index | | ||
aBlock value: (self at: index) ] | ||
aBlock value: (self at: index) ] |
4 changes: 4 additions & 0 deletions
4
repository/Seaside-Zinc-Core.package/ZnRingBuffer.class/instance/nextPutAllOn..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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
operations | ||
nextPutAllOn: aStream | ||
|
||
self do: [ :element | aStream nextPut: element ] |
2 changes: 1 addition & 1 deletion
2
repository/Seaside-Zinc-Core.package/ZnRingBuffer.class/properties.json
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
8 changes: 5 additions & 3 deletions
8
repository/Seaside-Zinc-Core.package/ZnServer.extension/instance/streamUploads..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,5 +1,7 @@ | ||
*Seaside-Zinc-Core | ||
streamUploads: aBoolean | ||
^ self | ||
optionAt: #streamUploads | ||
put: aBoolean | ||
|
||
| result | | ||
result := self optionAt: #streamUploads put: aBoolean. | ||
self delegate adaptor configureServerForBinaryReading. | ||
^ result |
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
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
28 changes: 28 additions & 0 deletions
28
repository/Seaside-Zinc-Tests.package/ZnRingBufferTest.class/instance/testNextPutAllOn.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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
tests | ||
testNextPutAllOn | ||
|
||
| buffer temporaryFile | | ||
buffer := GRPlatform current ringBufferClass on: (ByteArray new: 4). | ||
buffer | ||
at: 1 put: 128; | ||
at: 2 put: 129; | ||
at: 3 put: 130; | ||
at: 4 put: 131. | ||
temporaryFile := GRPlatform current newTemporaryFile. | ||
[ | ||
GRPlatform current | ||
writeFileStreamOn: temporaryFile | ||
do: [ :strm | buffer nextPutAllOn: strm ] | ||
binary: true. | ||
self assert: (GRPlatform current contentsOfFile: temporaryFile binary: true) equals: #[128 129 130 131] | ||
] ensure: [ GRPlatform current deleteFile: temporaryFile ]. | ||
|
||
buffer moveStartTo: 3. | ||
temporaryFile := GRPlatform current newTemporaryFile. | ||
[ | ||
GRPlatform current | ||
writeFileStreamOn: temporaryFile | ||
do: [ :strm | buffer nextPutAllOn: strm ] | ||
binary: true. | ||
self assert: (GRPlatform current contentsOfFile: temporaryFile binary: true) equals: #[130 131 128 129] | ||
] ensure: [ GRPlatform current deleteFile: temporaryFile ]. |