Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • James 1 post 21 karma points
    Jul 06, 2015 @ 21:28
    James
    0

    Capture HTTP Redirects

    Are there any plans to show 3XX codes for redirects?

  • Dan Diplo 1554 posts 6205 karma points MVP 5x c-trib
    Jul 08, 2015 @ 08:15
    Dan Diplo
    0

    Hi James,

    Yeah, that's a good idea. Currently the checker follows any 301 or 302 redirects transparently (i.e. it checks the URL that is redirected to). But I realise some people might not want this behaviour and just see the status as is. So I think I should be able to make this a config option, so you can choose whether to follow redirects or not.

    What I'm doing is gathering all ideas and then will feed these into the next version. I'd rather do a few at once, rather than realising lots of small updates, so it may be a while, but your idea is definitely on the radar. Thanks for your feedback.

  • Wessel 3 posts 73 karma points
    Oct 21, 2016 @ 12:26
    Wessel
    0

    Hi Dan,

    Is there anything new to report on this? Being able to identify redirects on existing hyperlinks would be very useful.

    Thanks for your reply in advance,

    Wessel

  • Dan Diplo 1554 posts 6205 karma points MVP 5x c-trib
    Oct 21, 2016 @ 14:37
    Dan Diplo
    1

    Hi,

    Sorry, haven't looked at this project for a while - I've been too busy with my other packages (plus wife & kids!).

    The source code is on GitHub if you fancy a crack at modifying it. It would be simple to make it stop automatically following redirects. The relevant line is:

    https://github.com/DanDiplo/Diplo.LinkChecker/blob/master/Diplo.LinkChecker/Services/HttpCheckerService.cs#L104

    Just need to change AllowAutoRedirect to be false

    The next step would be to make it configurable.

    What would you expect it to do with a redirect? Just report it back as a redirect or follow it?

  • Wessel 3 posts 73 karma points
    Oct 21, 2016 @ 15:05
    Wessel
    0

    Thanks for your swift answer! Good to know the source of the package is available on GitHub.

    The feature to recognize redirects on outgoing links came up as a requirement in a client briefing, that's why I was looking into it.

    In an ideal situation it would report back the statuscode for the redirect, and the statuscode for the page that is being redirected to...

Please Sign in or register to post replies

Write your reply to:

Draft