netlify / gotrue

An SWT based API for managing users and issuing SWT tokens.
https://www.gotrueapi.org
MIT License
3.86k stars 285 forks source link

Fix trigger response handling for streamed 0 length response body #345

Closed paulo closed 1 year ago

paulo commented 1 year ago

For https://github.com/netlify/pillar-support/issues/395

- Summary

When the response is streamed (Content-Length == -1) but the body doesn't have any content, we fail hard when decoding the payload. This fixes that.

- Test plan

- Description for the changelog

Fix reading webhook response when content length is unknown and body is empty