Skip to content

fix: set Content-Type header on Hrana HTTP requests - #145

Open
erfanium wants to merge 1 commit into
tursodatabase:mainfrom
erfanium:fix/missing-content-type
Open

erfanium wants to merge 1 commit into
tursodatabase:mainfrom
erfanium:fix/missing-content-type

Conversation

@erfanium

Copy link
Copy Markdown

The sendPipelineRequest function in libsql/internal/http/hranaV2/hranaV2.go does not set a Content-Type header on POST requests. Some reverse proxies mangle JSON bodies when the header is missing, causing servers to return 400 errors.

This adds Content-Type: application/json to the request headers.

Without this header, reverse proxies may mangle the request body,
causing servers to fail deserialization with 'missing field requests'
errors.
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.

1 participant