Skip to content

Conversation

Olivier-OH
Copy link

Set it to empty string rather than an empty Object.

See issue #187

raw() parser: if body is empty set it to empty string rather than empty dictionnary.
@Olivier-OH
Copy link
Author

Olivier-OH commented Jul 27, 2016

Unit tests don't pass because somewhere an empty object is expected instead of an empty string.

I don't know whether I should change the unit test code. Is this important that the body is an empty object instead of an empty string?

@Olivier-OH
Copy link
Author

I changed the unit test code. I'll let the repo owners decide whether this is correct.

@dougwilson dougwilson added the pr label Jul 30, 2016
@dougwilson dougwilson self-assigned this Jul 30, 2016
@dougwilson
Copy link
Contributor

Hi @Olivier-OH, defaulting to a string in the raw parser does not make sense, since a successful raw parse results in a Buffer object, not a string. Besides, we actually went ahead and fixed these semantics in the 2.0 branch. Please go ahead and check out the proposed 2.0 release in #66 :)

@dougwilson dougwilson closed this Jul 30, 2016
@Olivier-OH
Copy link
Author

Great! Thanks for your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants