Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
recurls
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Łukasz Nowak
recurls
Commits
c41d4ef1
Commit
c41d4ef1
authored
Sep 24, 2024
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
recurls: Enforce proper headers type
http.client.HTTPMessage is required for proper header setup.
parent
f3e12dd6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
src/recurls/recurls.py
src/recurls/recurls.py
+4
-1
No files found.
src/recurls/recurls.py
View file @
c41d4ef1
...
...
@@ -5,6 +5,7 @@ import subprocess
from
requests.structures
import
CaseInsensitiveDict
import
gzip
import
os
import
http.client
class
RecurlsResponse
(
object
):
...
...
@@ -88,7 +89,9 @@ class Recurls(object):
elif
isinstance
(
verify
,
str
):
command_list
.
extend
([
'--cacert'
,
verify
])
if
headers
is
None
:
headers
=
{}
headers
=
http
.
client
.
HTTPMessage
()
else
:
assert
isinstance
(
headers
,
http
.
client
.
HTTPMessage
)
with
open
(
request_header_file
,
'w'
)
as
fh
:
for
header
,
value
in
headers
.
items
():
fh
.
write
(
'%s: %s
\
n
'
%
(
header
,
value
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment