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

Added check for edge case where byte string is empty. #9

Merged
merged 1 commit into from
Dec 14, 2015

Conversation

sbreatnach
Copy link
Contributor

This was an edge case I came across while testing DELETE calls - if the recorded response body is empty, an exception is thrown because it's decoding an invalid base64 string.
There are a couple of different ways to fix this, but I went for the simplest: an empty check in str->bytes.

@gfredericks
Copy link
Owner

How does this relate to #8?

@sbreatnach
Copy link
Contributor Author

I didn't see that issue before, but it is related - the body definition that causes this bug is :body #vcr-clj/bytes "".

gfredericks added a commit that referenced this pull request Dec 14, 2015
Added check for edge case where byte string is empty.
@gfredericks gfredericks merged commit c0f81d9 into gfredericks:master Dec 14, 2015
@gfredericks
Copy link
Owner

Gotcha -- I had forgotten we handled both byte arrays and input streams.

Thanks! I just released this as 0.4.6.

@sbreatnach
Copy link
Contributor Author

Cool, thanks for the quick response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants