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

Fixed empty response body playback #6

Merged
merged 1 commit into from
Jul 31, 2018

Conversation

parfeon
Copy link
Owner

@parfeon parfeon commented Jul 31, 2018

Looks like NSURLProtocol clients doesn't like when empty data is sent to them with -URLProtocol:didLoadData: and process stops (no feedback about data consumption).
With fix, when response body stub should be played, it checks first whether there is some binary data in it. If stub doesn't have response data, it marked as played and playback continues.

@parfeon parfeon added the bug Something isn't working label Jul 31, 2018
@parfeon parfeon self-assigned this Jul 31, 2018
@codecov-io
Copy link

Codecov Report

Merging #6 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #6      +/-   ##
==========================================
+ Coverage   97.82%   97.82%   +<.01%     
==========================================
  Files          40       40              
  Lines        3492     3501       +9     
==========================================
+ Hits         3416     3425       +9     
  Misses         76       76
Impacted Files Coverage Δ
.../Integration/YHVCassettePlaybackIntegerationTest.m 100% <100%> (ø) ⬆️
YAHTTPVCR/Core/YHVCassette.m 94.05% <100%> (+0.03%) ⬆️

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 e93d7fd...a6352ee. Read the comment docs.

@parfeon parfeon merged commit 958451b into master Jul 31, 2018
@parfeon parfeon deleted the fix-empty-response-body-playback branch July 31, 2018 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants