Skip to content

Fix content length proxying#197

Merged
syumai merged 1 commit into
syumai:mainfrom
theuargb:fix-content-length-proxying
May 4, 2026
Merged

Fix content length proxying#197
syumai merged 1 commit into
syumai:mainfrom
theuargb:fix-content-length-proxying

Conversation

@theuargb

@theuargb theuargb commented May 2, 2026

Copy link
Copy Markdown
Contributor

Fix issue with outgoing fetch() requests where Content-Length header could not be set therefore remote origin (the one we fetch()-ing to from our worker) rejectes request with 4xx

@b0ch3nski

b0ch3nski commented May 3, 2026

Copy link
Copy Markdown
Contributor

One change at a time, please - otherwise Content-Length part looks good to me 👍

Comment thread internal/jshttp/request.go Outdated
// from JS Request objects, so it will typically be missing for requests
// that transit through the JS bridge. When the header is absent but a
// body stream exists, use -1 (unknown) instead of 0 (empty) so that
// consumers like PocketBase don't skip body parsing.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

PocketBase

This specific tool name doesn't seem necessary. Please remove it from the comment.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done @syumai

@theuargb

theuargb commented May 4, 2026

Copy link
Copy Markdown
Contributor Author

One change at a time 👍

bro @b0ch3nski, cool down.

i thought this repo is abandoned and just fired PRs just in case.
i didn't knew there is a guarding angel commenting every move

@theuargb theuargb force-pushed the fix-content-length-proxying branch from 856d5a3 to 32f9699 Compare May 4, 2026 07:59

@syumai syumai left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks!

@syumai syumai merged commit 198cd8c into syumai:main May 4, 2026
2 checks passed
@theuargb theuargb deleted the fix-content-length-proxying branch May 4, 2026 08:16
@b0ch3nski

Copy link
Copy Markdown
Contributor

i didn't knew there is a guarding angel commenting every move

Well, I'm much in favor of this library and using it in some of my projects - I'm trying to follow the development and contribute back to the community with reviews, fixes and improvements that I stumble upon 😺

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.

3 participants