Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
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
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
Łukasz Nowak
caddy
Commits
b51e8bc1
Commit
b51e8bc1
authored
Apr 30, 2015
by
Matthew Holt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fastcgi: Fix for handling errors that come from responder
parent
27722463
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
middleware/fastcgi/fastcgi.go
middleware/fastcgi/fastcgi.go
+4
-1
No files found.
middleware/fastcgi/fastcgi.go
View file @
b51e8bc1
...
@@ -111,12 +111,15 @@ func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error)
...
@@ -111,12 +111,15 @@ func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error)
w
.
WriteHeader
(
resp
.
StatusCode
)
w
.
WriteHeader
(
resp
.
StatusCode
)
// Write the response body
// Write the response body
// TODO: If this has an error, the response will already be
// partly written. We should copy out of resp.Body into a buffer
// first, then write it to the response...
_
,
err
=
io
.
Copy
(
w
,
resp
.
Body
)
_
,
err
=
io
.
Copy
(
w
,
resp
.
Body
)
if
err
!=
nil
{
if
err
!=
nil
{
return
http
.
StatusBadGateway
,
err
return
http
.
StatusBadGateway
,
err
}
}
return
resp
.
StatusCode
,
nil
return
0
,
nil
}
}
}
}
...
...
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