Skip to content

Conversation

@colega
Copy link
Contributor

@colega colega commented Aug 16, 2018

An empty-body HTTP 200 OK response was returned to malformed requests
because:

  • As JSON could not be parsed, res.Version was empty and err was
    being overwritten by E_INVALID_REQ. Solution: only check that if there
    was no parse error.
  • As JSON could not be parsed, red.Id was empty and writeServerResponse
    was considering it was a Notification request, so the response was
    discarded. Solution: if ID is empty, make sure we're not trying to
    write an E_PARSE error.

colega added 2 commits August 16, 2018 12:21
An empty-body HTTP 200 OK response was returned to malformed requests
because:
 - As JSON could not be parsed, res.Version was empty and `err` was
 being overwritten by E_INVALID_REQ. Solution: only check that if there
 was no parse error.
 - As JSON could not be parsed, red.Id was empty and writeServerResponse
 was considering it was a Notification request, so the response was
 discarded. Solution: if ID is empty, make sure we're not trying to
 write an E_PARSE error.
@kisielk kisielk merged commit 8f370ca into gorilla:master Mar 22, 2019
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