linkcheck icon indicating copy to clipboard operation
linkcheck copied to clipboard

Support for HTTPS scheme

Open bizz84 opened this issue 1 year ago • 2 comments

My localhost site is hosted on https:

linkcheck https://localhost:4321/

However, when I run the tool, I get this:

Done crawling.                   

Provided URLs failing:
https://localhost:4321/ (connection failed)

Error. Couldn't connect or find any links. Have you started the server?

Is it possible to enable https on localhost?

bizz84 avatar Jul 10 '24 07:07 bizz84

Hmm, to be honest, I don't even know how big of change this would be. Does Dart support HTTPS natively? I'll have to investigate. Also, any help would be greatly appreciated, as I'm currently not focusing on this package.

filiph avatar Jul 10 '24 10:07 filiph

I did a bit of debugging and found out that this getter returns true because my statusCode is null:

  bool get isBroken =>
      statusCode != 200 && !wasDeniedByRobotsTxt && !isUnsupportedScheme;

Oddly, this works fine if I point to a non-localhost URL.

I'll report back if I get a chance to look closer.

bizz84 avatar Jul 10 '24 18:07 bizz84