mattgodbolt / seasocks

Simple, small, C++ embeddable webserver with WebSockets support
BSD 2-Clause "Simplified" License
724 stars 120 forks source link

check the return code of ::deflate for errors; handle the case where … #126

Closed cake4289 closed 5 years ago

cake4289 commented 5 years ago

…inputLen == 0 by inserting an empty uncompressed block when not present

Fixes #125

offa commented 5 years ago

Please let me know once you are ready and I'll merge this.

codecov[bot] commented 5 years ago

Codecov Report

Merging #126 into master will decrease coverage by 0.08%. The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #126      +/-   ##
==========================================
- Coverage    36.7%   36.62%   -0.09%     
==========================================
  Files          52       52              
  Lines        2245     2250       +5     
==========================================
  Hits          824      824              
- Misses       1421     1426       +5
Impacted Files Coverage Δ
src/main/c/seasocks/ZlibContext.cpp 0% <0%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3e41cd2...18c6208. Read the comment docs.

codecov[bot] commented 5 years ago

Codecov Report

Merging #126 into master will decrease coverage by 0.08%. The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #126      +/-   ##
==========================================
- Coverage    36.7%   36.62%   -0.09%     
==========================================
  Files          52       52              
  Lines        2245     2250       +5     
==========================================
  Hits          824      824              
- Misses       1421     1426       +5
Impacted Files Coverage Δ
src/main/c/seasocks/ZlibContext.cpp 0% <0%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3e41cd2...18c6208. Read the comment docs.

cake4289 commented 5 years ago

Ok I'm done with my changes - but there are no tests covering compression currently. Should I add some? I've just been testing locally with an echo server.

offa commented 5 years ago

Tests are always welcome. However, in this case there aren't any so this shouldn't be a blocker for the PR.

If you can provide some tests, feel free to open another PR :-)