Skip to content

httpx uses proxy unexpectedly on windows #1512

@amchii

Description

@amchii

Checklist

  • The bug is reproducible against the latest release and/or master.
  • There are no similar issues or pull requests to fix it yet.

Describe the bug

I set a proxy globally on 127.0.0.1:10909 but except for localhost/127.0.0.1(Windows Setting->Network->Proxy ), then I found httpx.get('http://127.0.0.1:8000') will use the proxy(unexpected), but chrome and requests.get('http://127.0.0.1:8000') accessed it directly(expected).

To reproduce

  1. Set a proxy globally but except for localhost\127.0.0.1,
  2. Exec httpx.get('http://127.0.0.1:8000') .

Expected behavior

httpx.get accesses http://127.0.0.1:8000 without proxy.

Actual behavior

httpx.get accesses http://127.0.0.1:8000 with proxy.

Debugging material

Environment

  • OS: Windows 10
  • Python version: 3.7.6
  • HTTPX version: 0.17.0
  • Async environment: no
  • HTTP proxy: no
  • Custom certificates: no

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions