Skip to content
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

HTTP redirection to HTTPS not supported #381

Open
marcuskbr opened this issue Jan 26, 2025 · 2 comments
Open

HTTP redirection to HTTPS not supported #381

marcuskbr opened this issue Jan 26, 2025 · 2 comments
Assignees

Comments

@marcuskbr
Copy link

lightpanda http://www.example.com
produces the error
error(cli): 'http://www.example.com' fetching error (error.TlsInitializationFailed)s

lightpanda does not support a URL with the HTTP protocol and gives a cryptic error message.
I would like to see the following enhancements:

  1. provide support for HTTP URLs
  2. display a better error message for URLs with an unsupported protocol.

Thanks, Marcus

@krichprollsch
Copy link
Member

@marcuskbr Thanks for the issue.

I'm afraid can't reproduce. We should handle http connection correctly.

$ ./lightpanda-x86_64-linux --verbose http://www.example.com
debug(cli): Fetch mode: url http://www.example.com, dump false
debug(browser): start js env
debug(browser): setup global env
debug(browser): starting GET http://www.example.com
info(browser): GET http://www.example.com/ 200
debug(browser): http.Version.HTTP/1.1 200 OK
debug(browser): header content-type: text/html
debug(browser): parse html with charset utf-8
debug(browser): wait: OK

Can you share the cryptic error message?
What OS are you using?

@marcuskbr
Copy link
Author

marcuskbr commented Jan 27, 2025

Indeed, my bad, I substituted my test URL by www.example.com when I reported the issue. Indeed http://www.example.com also works on my system.
Here is attempt #2 in explaining the issue:
On Ubuntu 22.04:
./lightpanda-x86_64-linux --verbose http://www.example.com WORKS

./lightpanda-x86_64-linux --verbose http://www.urlfilterdb.com FAILS with
error(cli): 'http://www.urlfilterdb.com' fetching error (error.TlsInitializationFailed)s

./lightpanda-x86_64-linux --verbose https://www.urlfilterdb.com WORKS

Note that http://www.urlfilterdb.com redirects to https://www.urlfilterdb.com

@marcuskbr marcuskbr changed the title HTTP not supported HTTP redirection not supported Jan 27, 2025
@marcuskbr marcuskbr changed the title HTTP redirection not supported HTTP redirection to HTTPS not supported Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants