Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-workhorse
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-workhorse
Commits
d1a7eb5d
Commit
d1a7eb5d
authored
May 28, 2020
by
Georges-Etienne Legendre
Committed by
Nick Thomas
Jun 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable compression for openHttpArchive
parent
10f23d51
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 @
d1a7eb5d
---
title
:
Disable compression for open archive
merge_request
:
508
author
:
Georges-Etienne Legendre
type
:
fixed
internal/zipartifacts/open_archive.go
View file @
d1a7eb5d
...
...
@@ -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 @
d1a7eb5d
...
...
@@ -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