得得

开源
FastGithub社区

python requests error on centos7

shungo2020 2021-11-15 14:11 8回复

Bug描述
[ERR]
Microsoft.AspNetCore.Server.Kestrel
Connection id "0HMD7VE0TQ5CP", Request id "0HMD7VE0TQ5CP:00000002": An unhandled exception was thrown by the application.
System.ArgumentException: The parameter 'host' cannot be an empty string.
at System.Net.DnsEndPoint..ctor(String , Int32 , AddressFamily )
at System.Net.DnsEndPoint..ctor(String , Int32 )
at FastGithub.HttpServer.HttpProxyMiddleware.GetTargetEndPointAsync(HostString host)
at FastGithub.HttpServer.HttpProxyMiddleware.InvokeAsync(HttpContext context)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

重现步骤

  1. run fastgithub
  2. export http_proxy=http://127.0.0.1:38457
    export https_proxy=http://127.0.0.1:38457
  3. run python script:
    url = 'https://raw.githubusercontent.com/huggingface/datasets/1.15.1/datasets/glue/glue.py' response = requests.request(method="HEAD", url=url) print(response.request.headers)

wget可以正常工作

软件信息

  • 操作系统: centos7
  • FastGithub:v2.0.7
8 条回复