Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b7b5ef82
Commit
b7b5ef82
authored
May 28, 2020
by
Georges-Etienne Legendre
Committed by
Nick Thomas
May 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable compression for openHttpArchive
parent
ce7b2d8d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
0 deletions
+19
-0
changelogs/unreleased/fix-issue-264.yml
changelogs/unreleased/fix-issue-264.yml
+5
-0
internal/zipartifacts/open_archive.go
internal/zipartifacts/open_archive.go
+1
-0
internal/zipartifacts/open_archive_test.go
internal/zipartifacts/open_archive_test.go
+13
-0
No files found.
changelogs/unreleased/fix-issue-264.yml
0 → 100644
View file @
b7b5ef82
---
title
:
Disable compression for open archive
merge_request
:
508
author
:
Georges-Etienne Legendre
type
:
fixed
internal/zipartifacts/open_archive.go
View file @
b7b5ef82
...
...
@@ -29,6 +29,7 @@ var httpClient = &http.Client{
TLSHandshakeTimeout
:
10
*
time
.
Second
,
ExpectContinueTimeout
:
10
*
time
.
Second
,
ResponseHeaderTimeout
:
30
*
time
.
Second
,
DisableCompression
:
true
,
})),
}
...
...
internal/zipartifacts/open_archive_test.go
View file @
b7b5ef82
...
...
@@ -53,3 +53,16 @@ func TestOpenHTTPArchive(t *testing.T) {
require
.
NoError
(
t
,
err
,
"read zip entry contents"
)
require
.
Equal
(
t
,
contents
,
string
(
actualContents
),
"compare zip entry contents"
)
}
func
TestOpenHTTPArchiveNotSendingAcceptEncodingHeader
(
t
*
testing
.
T
)
{
requestHandler
:=
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
require
.
Equal
(
t
,
"GET"
,
r
.
Method
)
require
.
Nil
(
t
,
r
.
Header
[
"Accept-Encoding"
])
w
.
WriteHeader
(
http
.
StatusOK
)
}
srv
:=
httptest
.
NewServer
(
http
.
HandlerFunc
(
requestHandler
))
defer
srv
.
Close
()
OpenArchive
(
context
.
Background
(),
srv
.
URL
)
}
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