HTTPretty icon indicating copy to clipboard operation
HTTPretty copied to clipboard

add support for 421: "Misdirected Request"

Open lsoares opened this issue 3 years ago • 3 comments

lsoares avatar Sep 08 '22 09:09 lsoares

If you currently pass 421, shouldn't it fail internally with a KeyError here?

https://github.com/lsoares/HTTPretty/blob/master/httpretty/core.py#L1106

OneCricketeer avatar Sep 08 '22 21:09 OneCricketeer

If I pass 421, I get requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) when using requests library. more info

lsoares avatar Sep 08 '22 22:09 lsoares

the current hack I used:

from httpretty.http import STATUSES

STATUSES[421] = "Misdirected Request"

lsoares avatar Sep 08 '22 22:09 lsoares