Skip to content

Commit

Permalink
Fix streaming file upload in GemStone: GsFile>>nextPutAll: wrote 0 by…
Browse files Browse the repository at this point in the history
…tes on the file when invoked with a ZnStringBuffer as argument due to the optimized implementation. Fixed by writing the internal collection class instead.
  • Loading branch information
jbrichau committed Mar 17, 2024
1 parent 9998d1f commit 166a98c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
private
writeAllOn: aStream

aStream nextPutAll: buffer

Check warning on line 4 in repository/Seaside-Zinc-Core.package/ZnRingBuffer.class/instance/writeAllOn..st

View check run for this annotation

Codecov / codecov/patch

repository/Seaside-Zinc-Core.package/ZnRingBuffer.class/instance/writeAllOn..st#L1-L4

Added lines #L1 - L4 were not covered by tests
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ parseMultiPartFieldWithoutLengthWithBoundary: aBoundary writeOn: writer
If not we have to check for the next boundary candidate as we might have loaded the next boundary partially."
buffer = aBoundary ] ]
ifNil: [
writer nextPutAll: buffer.
buffer writeAllOn: writer.
stream atEnd
ifFalse: [
"#next:into: answers a copy of the buffer if not enough bytes could be read.
Expand Down

0 comments on commit 166a98c

Please sign in to comment.