Skip to content
This repository has been archived by the owner on Aug 11, 2023. It is now read-only.

Scheme required for sitemap url CLI argument to pass validation #15

Closed
wjh18 opened this issue Mar 29, 2023 · 1 comment
Closed

Scheme required for sitemap url CLI argument to pass validation #15

wjh18 opened this issue Mar 29, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@wjh18
Copy link
Owner

wjh18 commented Mar 29, 2023

Describe the bug
You can't enter your sitemap url via the cli without a URL scheme. Non-sitemap urls are converted successfully.

To Reproduce

$ psi example.com/sitemap.xml -f sitemap
> Invalid URL. Please enter a valid fully-qualified URL.
$ psi www.example.com/sitemap.xml -f sitemap
> Invalid URL. Please enter a valid fully-qualified URL.
$ psi www.example.com/sitemap.xml/ -f sitemap
> Invalid URL. Please enter a valid fully-qualified URL.

$ psi https://www.example.com/sitemap.xml/ -f sitemap
> Invalid sitemap URL provided. Please provide a URL to a valid XML sitemap.

Also, the last example is a separate issue caused by oversimplified extension validation where the trailing slash gets in the way. Might be worth taking a second look at that too.

Expected behavior
Should recognize as valid url where appropriate and add scheme if missing.

@wjh18 wjh18 added the bug Something isn't working label Mar 29, 2023
@wjh18
Copy link
Owner Author

wjh18 commented Jul 3, 2023

Fixed in e0629ec

Issue wasn't just with sitemaps, it was any url args without a scheme that had either a path or filepath.

@wjh18 wjh18 closed this as completed Jul 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant