Skip to content

httpx uses proxy unexpectedly on windows #1512

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

Activity

  1. locked and limited conversation to collaborators on Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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