Fiddler Ideas

The free web debugging proxy for any browser, system or platform.

400 Bad Request

code

#!/usr/bin/env python3
from urllib.request import urlopen

# with fiddler open
# no problem, see the slash
resp = urlopen("http://www.baidu.com/")

# with fiddler open
# raises 400 Bad Request
resp = urlopen("http://www.baidu.com")


# with fiddler close
# no problem
resp = urlopen("http://www.baidu.com")

wireshark

see wireshark.png

 

EXTRA

v5.0.20181.14850 for .NET 4.6.1
64-bit AMD64, VM: 47.0mb, WS: 87.0mb
.NET 4.6.2 WinNT 10.0.17134.0

  • Guest
  • Jun 1 2018
  • Under review
Bug
  • Attach files
  • Eric Lawrence commented
    5 Jun, 2018 04:03pm

    In Fiddler, you should have received a HTTP protocol warning noting that URLs require a trailing slash after the hostname (meaning, a non-empty path component). Per the HTTP specification, clients should be adding such a slash (Python apparently does not) and servers absolutely need to be treating such requests equivalently whether the slash is present or not.