Support » Plugins » [Plugin: Broken Link Checker] Sends wrong request on redirects with #anchors

  • I’ve noticed consistent false positives on certain redirect links, and I think I’ve finally isolated the cause. The links in question are returning a URL with an in-page anchor at the end, of the form, and the anchor is not being removed before checking the new location. So it sends the whole thing, asking the server for a file named “/page1#section1”, which doesn’t exist, generating a 404 error.

    An example:

    1. Log : === First try : 404 ===
    HTTP/1.1 301 Moved Permanently
    Date: Tue, 17 Feb 2009 03:37:03 GMT
    Server: Apache/2.2.9 (Ubuntu) PHP/5.2.6-2ubuntu4 with Suhosin-Patch Phusion_Passenger/2.0.6
    X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 2.0.6
    X-Runtime: 134ms
    Cache-Control: no-cache
    Set-Cookie: _trim=7c626ad8db30c14a82232fc8b99e16d2; path=/; expires=Mon, 18 May 2009 01:28:08 GMT
    Content-Length: 180
    Vary: Accept-Encoding
    Connection: close
    Content-Type: text/html; charset=utf-8

    Trying a second time with different settings…
    === Second try : 404 ===
    HTTP/1.1 404 Not Found
    Date: Tue, 17 Feb 2009 03:28:21 GMT
    Server: Apache/2.2.3 (CentOS)
    X-Powered-By: PHP/5.1.6
    Expires: Wed, 11 Jan 1984 05:00:00 GMT
    Last-Modified: Tue, 17 Feb 2009 03:28:21 GMT
    Cache-Control: no-cache, must-revalidate, max-age=0
    Pragma: no-cache
    Transfer-Encoding: chunked
    Content-Type: text/html; charset=UTF-8

    Link is broken.

  • The topic ‘[Plugin: Broken Link Checker] Sends wrong request on redirects with #anchors’ is closed to new replies.