Comments (1)
I worked around the bug with:
# Workaround for bug in requests 2.32.x: https://github.com/psf/requests/issues/6735
def requests_workaround(method, url, json, headers, auth, verify=False):
# Create a session
session=requests.Session()
# Prepare the request
request=requests.Request(method, url, json=json, headers=headers, auth=auth)
prepared_request=session.prepare_request(request)
prepared_request.url=prepared_request.url.replace('%25', '%')
return session.send(prepared_request, verify=verify)
def requests_workaround_put(url, json, headers, auth, verify=False):
return requests_workaround('PUT', url, json, headers, auth, verify=False)
def requests_workaround_delete(url, headers, auth, verify=False):
return requests_workaround('DELETE', url, None, headers, auth, verify=False)
def requests_workaround_post(url, json, headers, auth, verify=False):
return requests_workaround('POST', url, json, headers, auth, verify=False)
def requests_workaround_get(url, headers, auth, verify=False):
return requests_workaround('GET', url, None, headers, auth, verify=False)
from requests.
Related Issues (20)
- Error when headers return 'Location' as an app://xxxx although I have set disable redirects HOT 3
- requests library seems to ignore "Transfer-Encoding" header HOT 1
- Request can't get berkshirehathaway letters.html correctly HOT 1
- "Transfer-Encoding" header is ignored HOT 1
- Body with Special Characters Gets Cut HOT 9
- permission denied regression reading extracted certs with multiple users HOT 1
- 一个while True requests运行的爬虫程序,会报错:HTTPSConnectionPool(host='***', port=443): Max retries exceeded with url: /aa (Caused by SSLError(OSError(24, 'Too many open files'))) HOT 1
- Same code works with Python 3.10 but not with 3.11 HOT 2
- With setuptools 72.0.0 requests can no longer be installed from git HOT 5
- Documentation of what to override when using custom adapter HOT 1
- What should be Overwritten to ignore all verification in a custom adapter? HOT 2
- Request for py3.7 support HOT 1
- Support for py3.7 HOT 1
- Doc: missing example HOT 2
- QUIC over Socks5/UDP capable proxy is not working. HOT 3
- Multiple path separators causes bad requests
- Any ipv6 request spuriously stays stuck for a long time, sometimes never progressing HOT 1
- Time between request sent and first byte received (time to first byte) HOT 1
- Import time regression
- Add Warning for Incorrect Keyword Arguments in POST Requests (e.g., 'header' instead of 'headers') HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from requests.