Seaside icon indicating copy to clipboard operation
Seaside copied to clipboard

POC implementation of WAComboResponse acting directly on a socket stream

Open theseion opened this issue 3 years ago • 5 comments

This is a clone of #1159, which was opened against the now removed develop branch.

See also the discussion in #1159.

theseion avatar Feb 16 '21 17:02 theseion

@jbrichau I have WAComboResponse working with streaming in Pharo 9 and 10, but below the converters don't behave like I need them too (i.e., there is no converter that can write strings to a ByteArray. In Pharo 10 Zinc does that and in Pharo 9 the UTF-8 converter does it too). I don't know how I should solve it. Maybe we need another delegating stream that converts from characters to bytes but I'm reluctant to do that.

theseion avatar Jun 06 '22 07:06 theseion

(i.e., there is no converter that can write strings to a ByteArray. In Pharo 10 Zinc does that and in Pharo 9 the UTF-8 converter does it too). I don't know how I should solve it. Maybe we need another delegating stream that converts from characters to bytes but I'm reluctant to do that.

I think for 4.0 we should bite the bullet and make the codecs String -> ByteArray

marschall avatar Aug 21 '22 11:08 marschall

LGTM apart from my comments.

marschall avatar Aug 21 '22 11:08 marschall

Thanks @marschall. I'll make the changes soon.

theseion avatar Aug 22 '22 19:08 theseion

Codecov Report

Patch coverage: 96.70% and project coverage change: +0.29% :tada:

Comparison is base (b2d5425) 48.67% compared to head (dc76211) 48.97%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1240      +/-   ##
==========================================
+ Coverage   48.67%   48.97%   +0.29%     
==========================================
  Files        8946     8889      -57     
  Lines       80490    80050     -440     
==========================================
+ Hits        39178    39201      +23     
+ Misses      41312    40849     -463     
Files Changed Coverage Δ
...e.package/WAComboResponse.class/instance/binary.st 0.00% <0.00%> (ø)
....package/WAComboResponse.class/instance/destroy.st 0.00% <0.00%> (ø)
...Response.class/class/onStream.bufferSize.codec..st 100.00% <100.00%> (ø)
...re.package/WAComboResponse.class/instance/close.st 100.00% <100.00%> (+100.00%) :arrow_up:
...e.package/WAComboResponse.class/instance/commit.st 100.00% <100.00%> (+100.00%) :arrow_up:
...re.package/WAComboResponse.class/instance/flush.st 100.00% <100.00%> (+100.00%) :arrow_up:
...s/instance/initializeOnStream.bufferSize.codec..st 100.00% <100.00%> (ø)
...e/WAComboResponse.class/instance/nextChunk.put..st 100.00% <100.00%> (+100.00%) :arrow_up:
.../WAComboResponse.class/instance/writeHeadersOn..st 100.00% <100.00%> (ø)
...age/WAComboResponseTest.class/instance/response.st 100.00% <100.00%> (ø)
... and 2 more

... and 56 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Sep 18 '23 13:09 codecov[bot]