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 RFC7321 Media Types are case-insensitive

Motivation and Context

  • I have raised an issue to propose this change (required)

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.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Additional fixes:
- Support Accept headers with multiple Accept values
- Accept header values should be matched 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]>
@alexellis alexellis merged commit 467ba06 into openfaas:master Jul 16, 2025
1 check passed
@welteki welteki deleted the ndjson branch July 17, 2025 08:41
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