-
-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: lychee can not detect error relative url #1480
Comments
Just checked out your sample page, and it seems to work as expected. When clickinging on the link, it brings me to https://awang-01.github.io/testing/images/lychee.png, which seems to be the correct URL. The page responds with a 404, though. However, when I open it on the command-line with curl, it returns a 200:
It gives me:
That's very similar to what lychee sees, I guess. |
No, mre. You got that wrong. The image on But lychee uses I think this could be a duplicate of #1296 Edit: Simple reproduction:(For the other way around. Pages noted as missing, when they're there.) File tree: root
└── test
├── index.html
└── next.html
<a href="next.html">next</a>
just needs to exist. Serve a site from lychee http://localhost:3000/test/
# or
lychee http://localhost:3000/test/index.html Results in: > lychee http://localhost:3000/test/index.html
1/1 ━━━━━━━━━━━━━━━━━━━━ Finished extracting links Issues found in 1 input. Find details below.
[http://localhost:3000/test/index.html]:
✗ [404] http://localhost:3000/next.html | Failed: Network error: Not Found
🔍 1 Total (in 0s) ✅ 0 OK 🚫 1 Error As you can see, the relative link is not resolved correctly by lychee. Just as a note: > lychee --version
lychee 0.15.1 Note Also, running the above example like |
This commit introduces several improvements to the file checking process and URI handling: - Extract file checking logic into separate `Checker` structs (`FileChecker`, `WebsiteChecker`, `MailChecker`) - Improve handling of relative and absolute file paths - Enhance URI parsing and creation from file paths - Refactor `create_request` function for better clarity and error handling These changes provide better support for resolving relative links, handling different base URLs, and working with file paths. Fixes #1296 and #1480
It's fixed now. 🎉 lychee -v https://awang-01.github.io/testing/ ✘
[404] https://awang-01.github.io/testing/testing/images/lychee.png
[200] https://awang-01.github.io/testing/assets/styles.css
Issues found in 1 input. Find details below.
[https://awang-01.github.io/testing/]:
[404] https://awang-01.github.io/testing/testing/images/lychee.png
🔍 2 Total (in 0s) ✅ 1 OK 🚫 1 Error |
Forgot to mention that it's fixed in |
This commit introduces several improvements to the file checking process and URI handling: - Extract file checking logic into separate `Checker` structs (`FileChecker`, `WebsiteChecker`, `MailChecker`) - Improve handling of relative and absolute file paths - Enhance URI parsing and creation from file paths - Refactor `create_request` function for better clarity and error handling These changes provide better support for resolving relative links, handling different base URLs, and working with file paths. Fixes #1296 and #1480
This commit introduces several improvements to the file checking process and URI handling: - Extract file checking logic into separate `Checker` structs (`FileChecker`, `WebsiteChecker`, `MailChecker`) - Improve handling of relative and absolute file paths - Enhance URI parsing and creation from file paths - Refactor `create_request` function for better clarity and error handling These changes provide better support for resolving relative links, handling different base URLs, and working with file paths. Fixes #1296 and #1480
for this site: https://awang-01.github.io/testing/, there is an image with
src="testing/images/lychee.png"
that I was expecting to fail, butthe
https://awang-01.github.iotesting/images/lychee.png
should fail, but lychee automatically add a/
before the srcThe text was updated successfully, but these errors were encountered: