Skip to content

Fixes #183: Fix HTTP 200 error when connecting from mobile#189

Open
mhodgkinsonrowe wants to merge 1 commit intomarc0l92:masterfrom
mhodgkinsonrowe:fix/mobile-authentication-http200
Open

Fixes #183: Fix HTTP 200 error when connecting from mobile#189
mhodgkinsonrowe wants to merge 1 commit intomarc0l92:masterfrom
mhodgkinsonrowe:fix/mobile-authentication-http200

Conversation

@mhodgkinsonrowe
Copy link

Functions isJsonResponse(response: RequestUrlResponse) and isTextResponse(response: RequestUrlResponse) both look up response.headers['content-type'] with a lowercase key.
On desktop obsidian's requestUrl normalizes all HTTP headers to lowercase but on iOS/iPadOS it returns headers with their original casing so response.headers['content-type'] is undefined.

The fix changes this to a case-insensitive lookup. I've tested this on PC, Mac, iOS and iPadOS. I am unable to test it on Android.

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