Open shepazu opened 6 years ago
Here are some HTTP Error 414 Request URI too long references:
Pragmatically, best practice seems to indicate that we should keep URLS to fewer than 2048 characters, both for servers and for (older) browsers. Consider adding a length warning.
In this case, Adrian's URL was blocked at only 340 characters, either by the server or by the blog software. Manual testing showed that his server's limit seems to be 280 characters. Maybe that is a common blocking point that should be given a warning?
Another possible solution is to actually test the URL in the extension, send a curl test to see if the page gives an HTTP error, then warn the user about that particular server's limits and suggest a shorter selection and/or note.
Version 0.4.5 somewhat addresses this issue by switching to using only native URLSearchParams encoding, which uses +
instead of %20
, resulting in ~40% smaller query strings, more
stability, easier maintenance, and better URL readability.
Compare:
Can confirm that the sample URL works now (the shorter / new URL). After I updated the extension, of course.
Reported by Adrian Roselli (@aardrian) on Twitter: