filiph / linkcheck

Fast link checker
https://pub.dartlang.org/packages/linkcheck
MIT License
424 stars 51 forks source link

Support for HTTPS scheme #134

Open bizz84 opened 4 months ago

bizz84 commented 4 months ago

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?

filiph commented 4 months ago

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.

bizz84 commented 4 months ago

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.