Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix decode array if received uncomplete data #7

Merged
merged 2 commits into from
Jan 28, 2023

Conversation

estin
Copy link
Contributor

@estin estin commented Jan 27, 2023

Hi!
This PR must fix #6 (as it usually happens - while asking the question found a solution)

Solution - on decode array all items must be present in buffer
Each array item must have 2 \r\n

*2\r\n$5\r\nhello\r\n$5\r\nworld\r\n
https://redis.io/docs/reference/protocol-spec/#resp-arrays

Copy link
Member

@fafhrd91 fafhrd91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. could you add entry to changes

@codecov
Copy link

codecov bot commented Jan 27, 2023

Codecov Report

Base: 71.32% // Head: 66.35% // Decreases project coverage by -4.97% ⚠️

Coverage data is based on head (ca40570) compared to base (074066a).
Patch coverage: 83.22% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master       #7      +/-   ##
==========================================
- Coverage   71.32%   66.35%   -4.97%     
==========================================
  Files          14       14              
  Lines         823      749      -74     
==========================================
- Hits          587      497      -90     
- Misses        236      252      +16     
Impacted Files Coverage Δ
src/cmd/keys.rs 80.39% <ø> (ø)
src/lib.rs 0.00% <ø> (ø)
src/simple.rs 66.66% <67.64%> (+29.82%) ⬆️
src/cmd/connection.rs 82.14% <77.77%> (+3.19%) ⬆️
src/connector.rs 73.33% <86.66%> (-3.81%) ⬇️
src/cmd/pubsub.rs 88.50% <88.50%> (ø)
src/client.rs 50.00% <100.00%> (+1.78%) ⬆️
src/codec.rs 59.69% <100.00%> (-7.67%) ⬇️
src/cmd/strings.rs 40.81% <0.00%> (-3.19%) ⬇️
... and 4 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@fafhrd91 fafhrd91 merged commit 41c9d42 into ntex-rs:master Jan 28, 2023
@fafhrd91
Copy link
Member

thanks!

@estin estin mentioned this pull request Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected byte: 13 on parse response
2 participants