You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Utilities for trailing slash (withTrailingSlash) operate on URIs that have a meaning for trailing slash. http, https, (perhaps rsync, ftp and custom protocols are included)
However there are protocols like data:, mailto:, blob:, etc do not expect a trailing slash to be added or removed from the end.
Having a check (for invalid or invalid list of protocols) is costly on runtime and also not maintainable. One solution would be to support new options to both opt-in and also configure the list which is against costly.
I am mainly thinking of differentiating based on proto: and proto:/proto:// to do this automatically. (it still needs a new option to opt out btw)
The text was updated successfully, but these errors were encountered:
Thanks for the links dear @divine. I am thinking of a strategy that does not requires a maintainable list btw as we need to keep ufo compact. But finally if no other ways, behind a flag we might use a compiled regex.
Extracted from #175
Utilities for trailing slash (
withTrailingSlash
) operate on URIs that have a meaning for trailing slash.http
,https
, (perhapsrsync
,ftp
and custom protocols are included)However there are protocols like
data:
,mailto:
,blob:
, etc do not expect a trailing slash to be added or removed from the end.Having a check (for invalid or invalid list of protocols) is costly on runtime and also not maintainable. One solution would be to support new options to both opt-in and also configure the list which is against costly.
I am mainly thinking of differentiating based on
proto:
andproto:/
proto://
to do this automatically. (it still needs a new option to opt out btw)The text was updated successfully, but these errors were encountered: