!9 回合上游补丁

From: @dongjiao-joan 
Reviewed-by: @yangzhao_kl 
Signed-off-by: @yangzhao_kl
This commit is contained in:
openeuler-ci-bot 2024-05-11 08:04:05 +00:00 committed by Gitee
commit 75f230181b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 41 additions and 2 deletions

View File

@ -0,0 +1,35 @@
From 2a2ef2e670d11ee943d98044f548f0a24e27f8ba Mon Sep 17 00:00:00 2001
From: Pat Patterson <pat@superpat.com>
Date: Wed, 27 Jan 2021 09:01:23 -0800
Subject: [PATCH] Fix for #437 - remove erroneous charset param from
Content-Type header
---
requests_oauthlib/oauth2_session.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/requests_oauthlib/oauth2_session.py b/requests_oauthlib/oauth2_session.py
index bfec8e8..fad07f6 100644
--- a/requests_oauthlib/oauth2_session.py
+++ b/requests_oauthlib/oauth2_session.py
@@ -325,7 +325,7 @@ class OAuth2Session(requests.Session):
headers = headers or {
"Accept": "application/json",
- "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
+ "Content-Type": "application/x-www-form-urlencoded",
}
self.token = {}
request_kwargs = {}
@@ -426,7 +426,7 @@ class OAuth2Session(requests.Session):
if headers is None:
headers = {
"Accept": "application/json",
- "Content-Type": ("application/x-www-form-urlencoded;charset=UTF-8"),
+ "Content-Type": ("application/x-www-form-urlencoded"),
}
r = self.post(
--
2.27.0

View File

@ -1,11 +1,12 @@
%global _empty_manifest_terminate_build 0
Name: python-requests-oauthlib
Version: 1.3.1
Release: 1
Release: 2
Summary: OAuthlib authentication support for Requests.
License: ISC
URL: https://github.com/requests/requests-oauthlib
Source0: https://files.pythonhosted.org/packages/95/52/531ef197b426646f26b53815a7d2a67cb7a331ef098bb276db26a68ac49f/requests-oauthlib-1.3.1.tar.gz
Patch0: backport-remove-erroneous-charset-param-from-Content-Type-header.patch
BuildArch: noarch
%description
@ -26,7 +27,7 @@ Provides: python3-requests-oauthlib-doc
This project provides first-class OAuth library support for `Requests <http://python-requests.org>`.
%prep
%autosetup -n requests-oauthlib-1.3.1
%autosetup -p1 -n requests-oauthlib-1.3.1
%build
%py3_build
@ -66,6 +67,9 @@ mv %{buildroot}/doclist.lst .
%{_docdir}/*
%changelog
* Sat May 11 2024 dongjiao <dongjiao@kylinos.cn> - 1.3.1-2
- bugfix:remove erroneous charset param from Content-Type header
* Thu Jun 16 2022 OpenStack_SIG <openstack@openeuler.org> - 1.3.1-1
- Upgrade version for openstack yoga