浏览代码

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

pull/1428/head
Pierre-Yves Aillet 4 年前
committed by GitHub
父节点
当前提交
a988dcb823
找不到此签名对应的密钥 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': '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:


正在加载...
取消
保存