Browse Source

Adjust links validation user-agent to real value (#1427)

pull/1428/head
Pierre-Yves Aillet 3 years ago
committed by GitHub
parent
commit
a988dcb823
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      build/validate_links.py

+ 1
- 1
build/validate_links.py View File

@@ -24,7 +24,7 @@ def validate_links(links):
for link in links:
h = httplib2.Http(disable_ssl_certificate_validation=True, timeout=25)
try:
resp = h.request(link, headers={'user-agent': 'Mozilla/5.0'})
resp = h.request(link, headers={'user-agent': 'python-httplib2/0.9.2'})
code = int(resp[0]['status'])
# check if status code is a client or server error
if code >= 404:


Loading…
Cancel
Save