Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make linkcheck work on servers without HEAD, and add FTP status checking #934

Merged
merged 2 commits into from
Feb 5, 2019

Conversation

iamed2
Copy link
Contributor

@iamed2 iamed2 commented Jan 31, 2019

curl -I uses HEAD requests, which don't work on all servers. Links really only need GET, so we can fallback to that if HEAD fails.

I also added support for FTP status checking, once I found a way to get that information out. I needed to suppress the regular output of curl, which required redirecting to a file through curl -o (so I needed to use /dev/null instead of Julia's devnull).

This ended up making the regex matching code simpler.

@mortenpi
Copy link
Member

It seems that curl on Travis is too old for this, hence the errors. It should be 7.35.0 in Ubuntu 14.04, however, from the curl man page on --write-out:

scheme         The URL scheme (sometimes called protocol) that was effectively used (Added in 7.52.0)

Is there a way to avoid using %{scheme}?

@iamed2
Copy link
Contributor Author

iamed2 commented Jan 31, 2019

Is there a way to avoid using %{scheme}?

Likely; I'll figure something out

@mortenpi mortenpi added this to the 0.21.2 milestone Jan 31, 2019
@mortenpi
Copy link
Member

mortenpi commented Feb 5, 2019

Sorry for the delay, LGTM. Thanks! Will aim to backport and tag this shortly.

@mortenpi mortenpi merged commit 63a853e into JuliaDocs:master Feb 5, 2019
mortenpi pushed a commit that referenced this pull request Feb 5, 2019
…ing (#934)

* Make linkcheck work on servers without HEAD, and add FTP status checking

* Make linkcheck work on curl as early as 7.18.2

(cherry picked from commit 63a853e)
@mortenpi mortenpi mentioned this pull request Feb 5, 2019
mortenpi added a commit that referenced this pull request Feb 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants