fix(functions): match response Content-Type case-insensitively#2515
Merged
kallebysantos merged 1 commit intoJul 21, 2026
Merged
Conversation
kallebysantos
approved these changes
Jul 20, 2026
@supabase/auth-js
@supabase/functions-js
@supabase/postgrest-js
@supabase/realtime-js
@supabase/storage-js
@supabase/supabase-js
commit: |
Member
|
Vlw ai manim 💚 |
This was referenced Jul 21, 2026
mandarini
pushed a commit
to supabase/supabase
that referenced
this pull request
Jul 22, 2026
This PR updates @supabase/*-js libraries to version 2.110.8. **Source**: supabase-js-stable-release **Changes**: - Updated @supabase/supabase-js to 2.110.8 - Updated @supabase/auth-js to 2.110.8 - Updated @supabase/realtime-js to 2.110.8 - Updated @supabase/postgest-js to 2.110.8 - Refreshed pnpm-lock.yaml --- ## Release Notes ## v2.110.8 ## 2.110.8 (2026-07-21) ### 🩹 Fixes - **auth:** downgrade aborted/transient fetch failures from console.error to warn ([#2544](supabase/supabase-js#2544)) - **functions:** clean up cross-signal abort listener on invoke() return ([#2487](supabase/supabase-js#2487)) - **functions:** match response Content-Type case-insensitively ([#2515](supabase/supabase-js#2515)) - **storage:** url-encode object key in CDN purge methods ([#2545](supabase/supabase-js#2545)) - **supabase:** skip Node warning in Deno ([#2541](supabase/supabase-js#2541)) ### ❤️ Thank You - Franco Kaddour @FrancoKaddour - Katerina Skroumpelou @mandarini - Pedro Henrique - Vaibhav @7ttp ## v2.110.7 ## 2.110.7 (2026-07-16) ### 🩹 Fixes - **postgrest:** correct self-reference inference ([#2525](supabase/supabase-js#2525)) - **realtime:** trigger set auth on INITIAL_SESSION event ([#2531](supabase/supabase-js#2531)) - **realtime:** update phoenix to fix presence issue ([#2532](supabase/supabase-js#2532)) ### ❤️ Thank You - Eduardo Gurgel - Filipe Cabaço @filipecabaco - Vaibhav @7ttp This PR was created automatically. Co-authored-by: supabase-workflow-trigger[bot] <266661614+supabase-workflow-trigger[bot]@users.noreply.github.com>
mandarini
pushed a commit
to supabase/ssr
that referenced
this pull request
Jul 22, 2026
This PR updates `@supabase/supabase-js` to v2.110.8. **Source**: supabase-js-stable-release --- ## Release Notes ## v2.110.8 ## 2.110.8 (2026-07-21) ### 🩹 Fixes - **auth:** downgrade aborted/transient fetch failures from console.error to warn ([#2544](supabase/supabase-js#2544)) - **functions:** clean up cross-signal abort listener on invoke() return ([#2487](supabase/supabase-js#2487)) - **functions:** match response Content-Type case-insensitively ([#2515](supabase/supabase-js#2515)) - **storage:** url-encode object key in CDN purge methods ([#2545](supabase/supabase-js#2545)) - **supabase:** skip Node warning in Deno ([#2541](supabase/supabase-js#2541)) ### ❤️ Thank You - Franco Kaddour @FrancoKaddour - Katerina Skroumpelou @mandarini - Pedro Henrique - Vaibhav @7ttp This PR was created automatically. Co-authored-by: supabase-workflow-trigger[bot] <266661614+supabase-workflow-trigger[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔍 Description
What changed?
FunctionsClient.invoke()matched the responseContent-Typecase-sensitively when deciding how to parse the body (responseType === 'application/json', etc.). This normalizes the media type to lower case before matching.Why was this change needed?
HTTP media types are case-insensitive (RFC 9110 §8.3.1). If an Edge Function responds with
Content-Type: Application/JSON(orAPPLICATION/JSON), the client currently falls through to thetextbranch and returns the raw, unparsed string instead of the parsed JSON object.It's also inconsistent with the request side, which already detects the caller's
Content-Typecase-insensitively (key.toLowerCase() === 'content-type'); only the response side wasn't.🔄 Breaking changes
The compared media types are all lower case already, so lower-casing the incoming value only makes matching more tolerant.
📋 Checklist
pnpm nx formatto ensure consistent code formatting📝 Additional notes
Added
test/spec/response-content-type.spec.ts— a unit test (no relay) using a mockedcustomFetchasserting that lowercase, mixed-case, and uppercaseapplication/jsonresponses all parse as JSON. Verified locally: the mixed/upper cases fail without the change and pass with it;jest(new spec) → 3 passed,tsc --noEmit→ clean,prettier --check→ clean.