filiph / linkcheck

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

HTTP 308 Reported as Error #55

Closed jescalan closed 4 years ago

jescalan commented 4 years ago

Hello again, and thank you again for this amazing tool! I discovered today that any 308 status code is characterized as an error by the link checker, where I think it probably shouldn't be.

I tried to fix this locally but wasn't able to get anything working 😢 - if someone was able to provide a little guidance I'd be happy to take a stab at a PR!

chalin commented 4 years ago

I second this! 😄

filiph commented 4 years ago

Hmm, it's possible that dart:io itself doesn't know about HTTP 308. Is that something new? Is there a server that predictably serves HTTP 308 at some address? We might need to file a bug report at https://github.com/dart-lang/sdk.

If I'm correct, there's not much I can do since the request just comes back as 308 and that's that. (For 301 and other redirects, dart:io is clever enough to follow redirects to its final destination.) I guess we could manually work around this issue, but my hope here is that it's a relatively quick fix on Dart's side.

filiph commented 4 years ago

I looked at the SDK source and I'm pretty sure 308 is missing from there. Reported as https://github.com/dart-lang/sdk/issues/43548.

chalin commented 4 years ago

Thanks very much for looking into this, and opening the issue over the SDK!

jescalan commented 4 years ago

Seconding the thanks @filiph - I hope they will be able to patch this one soon! 💖

filiph commented 4 years ago

I ended up patching this myself over at https://github.com/dart-lang/sdk/commit/7e7c01e804179782f884b174706ed0c80fb2ef71. This will go out in the next Dart release (2.11.0).

jescalan commented 4 years ago

My hero! 💖

TripleEmcoder commented 5 months ago

Is this fix available in the latest release of the Docker image tennox/linkcheck? I think I am running into the same issue,