Skip to content

Conversation

welteki
Copy link
Member

@welteki welteki commented Jun 20, 2025

Description

Add support for streaming Newline Delimited JSON (NDJSON) from functions.

Additional fixes:

  • Support Accept headers with multiple Accept values
  • Accept header values should be matched case insensitive.
    As stated in RFC 7321 Media Types are case insensitive

How has this been tested

A unit test was added.

Tested E2E with OpenFaaS Pro and a custom Go function that streams an NDJSON response.

@welteki welteki force-pushed the ndjson branch 2 times, most recently from 3e36ae1 to f327f5c Compare June 20, 2025 11:46
Additional fixes:
- Support Accept headers with multiple Accept values
- Accept header values should be mathced case insensitive.
  As stated in RFC 7321: https://datatracker.ietf.org/doc/html/rfc7231#section-3.1.1.1
  Media Types are case-insensitive

Signed-off-by: Han Verstraete (OpenFaaS Ltd) <[email protected]>
Copy link
Member

@alexellis alexellis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@alexellis alexellis merged commit c81f542 into openfaas:master Jun 23, 2025
1 check passed
@welteki welteki deleted the ndjson branch June 23, 2025 16:57
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