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
05bf7368
Commit
05bf7368
authored
May 25, 2020
by
Georges-Etienne Legendre
Committed by
Nick Thomas
Jun 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Content-Length set prior to SendUrl injection
parent
d1a7eb5d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
changelogs/unreleased/fix-content-length-missing.yml
changelogs/unreleased/fix-content-length-missing.yml
+5
-0
internal/sendurl/sendurl.go
internal/sendurl/sendurl.go
+3
-0
No files found.
changelogs/unreleased/fix-content-length-missing.yml
0 → 100644
View file @
05bf7368
---
title
:
Fix Content-Length set prior to SendUrl injection
merge_request
:
496
author
:
Georges-Etienne Legendre
type
:
fixed
internal/sendurl/sendurl.go
View file @
05bf7368
...
@@ -148,6 +148,9 @@ func (e *entry) Inject(w http.ResponseWriter, r *http.Request, sendData string)
...
@@ -148,6 +148,9 @@ func (e *entry) Inject(w http.ResponseWriter, r *http.Request, sendData string)
return
return
}
}
// fix issue #267, where Content-Length was set prior to injection
w
.
Header
()
.
Del
(
"Content-Length"
)
// copy response headers and body, except the headers from preserveHeaderKeys
// copy response headers and body, except the headers from preserveHeaderKeys
for
key
,
value
:=
range
resp
.
Header
{
for
key
,
value
:=
range
resp
.
Header
{
if
!
preserveHeaderKeys
[
key
]
{
if
!
preserveHeaderKeys
[
key
]
{
...
...
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