瀏覽代碼

Update links validation user-agent (#1428)

pull/1287/head
Pierre-Yves Aillet 3 年之前
committed by GitHub
父節點
當前提交
dc38eb60b0
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      build/validate_links.py

+ 1
- 1
build/validate_links.py 查看文件

@@ -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': 'python-httplib2/0.9.2'})
resp = h.request(link, headers={'user-agent': 'python-httplib2/0.18.0'})
code = int(resp[0]['status'])
# check if status code is a client or server error
if code >= 404:


Loading…
取消
儲存