-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Open
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug description:
Compare node.js:
> response = await fetch('http://www.xlog.ch/echo/delete?foo1=bar1&foo2=bar2',
... {method:'DELETE'}); response.url
'https://www.xlog.ch/echo/delete?foo1=bar1&foo2=bar2'
With CPython:
request = urllib.request.Request('http://www.xlog.ch/echo/delete?foo1=bar1&foo2=bar2', method='DELETE')
response = urllib.request.urlopen(request)
urllib.error.HTTPError: HTTP Error 302:
I believe node.js fetch() redirects, whereas CPython thinks
302 is an error, since the method is neither HEAD, GET or PUT.
But its probably not an error, all methods are allowed:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Redirections
Metadata
Metadata
Assignees
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error