Skip to content

Support JSON-encoded X-TITLE header from thumbnail cache#100

Open
mini-bomba wants to merge 1 commit into
ajayyy:masterfrom
mini-bomba:json-title-header
Open

Support JSON-encoded X-TITLE header from thumbnail cache#100
mini-bomba wants to merge 1 commit into
ajayyy:masterfrom
mini-bomba:json-title-header

Conversation

@mini-bomba

@mini-bomba mini-bomba commented Jul 13, 2023

Copy link
Copy Markdown
Contributor
  • I agree to license my contribution under LGPL-3.0 or my contribution is from another project with a license compatible with LGPL-3.0

To test this pull request, follow the instructions in the wiki.


This PR allows the X-Title header received from thumbnail cache to be JSON-encoded as a way to transmit unicode characters.
This doesn't replace the raw ASCII format (yet), only decodes the header as JSON if it starts & ends with a ", then checks if a string was decoded (so we don't accidentally end up decoding an object or something like that)

This is the client-side part for solving ajayyy/DeArrowThumbnailCache#3. Server-side part is in ajayyy/DeArrowThumbnailCache#9.

@ajayyy

ajayyy commented Jul 13, 2023

Copy link
Copy Markdown
Owner

The invidious userscript uses the old behavior already. Maybe we should version it (change /api/v1 to /api/v{version}, pass that number to function)

@mini-bomba

Copy link
Copy Markdown
Contributor Author

Good point, I forgot about the whole versioned api thing

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.

2 participants