-
-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug report
When calling net.http_post() with a body over 65536 bytes, the first 65536 bytes are sent, and the request then hangs.
- I confirm this is a bug with Supabase, not with my own application.
- I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
When calling net.http_post() with a body over 65536 bytes, the first 65536 bytes are sent, and the request then hangs.
To Reproduce
- run an HTTP server locally on port 1337 to accept POST requests at
/ - run this script:
docker exec -it --env PAGER='' supabase_db_server-v2 psql -U postgres \
-c "SELECT net.http_post('http://$(hostname -I | cut -d' ' -f1):1337', ('{\"val\":\"' || (SELECT string_agg(lpad(to_hex(n%256),2,'0') ,'') FROM generate_series(1, 65520/2) AS n)||'\"}')::JSONB);"-
observe that it works ok
-
run this script (note the different series length):
docker exec -it --env PAGER='' supabase_db_server-v2 psql -U postgres \
-c "SELECT net.http_post('http://$(hostname -I | cut -d' ' -f1):1337', ('{\"val\":\"' || (SELECT string_agg(lpad(to_hex(n%256),2,'0') ,'') FROM generate_series(1, 65540/2) AS n)||'\"}')::JSONB);"Note that the HTTP server will not receive the full request.
Expected behavior
Full request body should be sent.
Screenshots
If applicable, add screenshots to help explain your problem.
System information
- OS: [e.g. macOS, Windows]
- Browser (if applies) N/A
- Version of supabase-js:
2.34.3 - Version of Node.js: N/A
Additional context
Running locally with npx supabase start
mzdm, matrn and martingeorgiu
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working