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 an exception raised with empty json requests. #440

Merged
merged 1 commit into from Dec 20, 2013

Conversation

Projects
None yet
2 participants
@ryan-scott-dev
Contributor

ryan-scott-dev commented Dec 18, 2013

Empty body requests with ‘Content-Type=application/json’ raise the exception “JSON string is empty.” when it tries to parse the result.

This is a huge issue with GET requests that use the content type to return either a html or json response.

@s-ludwig

This comment has been minimized.

Show comment
Hide comment
@s-ludwig

s-ludwig Dec 20, 2013

Member

Isn't the "Accept" header meant for that? It seems to be abuse of "Content-Type" to me, is this common practice? Anyway, that special case shouldn't cause any harm, so it's good to go.

Member

s-ludwig commented Dec 20, 2013

Isn't the "Accept" header meant for that? It seems to be abuse of "Content-Type" to me, is this common practice? Anyway, that special case shouldn't cause any harm, so it's good to go.

s-ludwig added a commit that referenced this pull request Dec 20, 2013

Merge pull request #440 from Archytaus/master
Fixed an exception raised with empty json requests.

@s-ludwig s-ludwig merged commit b6a18b5 into vibe-d:master Dec 20, 2013

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