Skip to content

Commit

Permalink
Update Chrome version in linkcheck user-agent (#2569)
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenpi authored Sep 1, 2024
1 parent 30f6ba2 commit 84fc937
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

* The `User-Agent` header set in the linkcheck HTTP(S) requests can now be customized with the `linkcheck_useragent` option to `makedocs`. ([#2557], [#2562])

### Changed

* The default `User-Agent` header set in the linkcheck HTTP(S) requests now reports `Chrome/127.0.0.0` instead of `Chrome/51.0.2704.103`. This _may_ change how servers interpret the linkcheck requests, and cause previously passing checks to failing, but it is more likely to fix previous spurious failures. ([#2557], [#2569])

### Fixed

* The paths for `size_threshold_ignore` option of `Documenter.HTML` are now correctly normalized and no longer sensitive to platform-dependent differences in path separators. ([#2560], [#2561])
Expand Down
2 changes: 1 addition & 1 deletion src/docchecks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ function linkcheck(node::MarkdownAST.Node, element::MarkdownAST.AbstractElement,
return nothing
end

const _LINKCHECK_DEFAULT_USERAGENT = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
const _LINKCHECK_DEFAULT_USERAGENT = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"

function linkcheck(node::MarkdownAST.Node, link::MarkdownAST.Link, doc::Document; method::Symbol=:HEAD)

Expand Down
1 change: 1 addition & 0 deletions test/online_linkcheck.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ using Test
[FTP (no proto) success](ftp.iana.org/tz/data/etcetera)
[Redirect success](google.com)
[HEAD fail GET success](https://codecov.io/gh/invenia/LibPQ.jl)
[Linkcheck old Chrome UA fail](https://www.intel.com/content/www/us/en/developer/tools/oneapi/mpi-library.html)
"""
)
doc = Documenter.Document(; linkcheck=true, linkcheck_timeout=20)
Expand Down

0 comments on commit 84fc937

Please sign in to comment.