Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Shushlin <vshushlin@gitlab.com>2022-02-01 15:38:52 +0300
committerVladimir Shushlin <vshushlin@gitlab.com>2022-02-01 15:38:52 +0300
commit0a700a8d6e64c35751abe40464b8ece13f84f597 (patch)
treed8d5468d2f86b75ed72ab10e44b661543d3ca194
parentbe03f220910a2188d824f81612221db78f74ff2a (diff)
parent1b50e38f3959c784f44c280720ed3249802d2622 (diff)
Merge branch 'revert-682a80ca' into 'master'
fix: Fix 500 errors when clients disconnect See merge request gitlab-org/gitlab-pages!681
-rw-r--r--internal/vfs/serving/serving.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/internal/vfs/serving/serving.go b/internal/vfs/serving/serving.go
index 57b0228f..6f45e1d5 100644
--- a/internal/vfs/serving/serving.go
+++ b/internal/vfs/serving/serving.go
@@ -47,17 +47,10 @@ func serveContent(w http.ResponseWriter, r *http.Request, modtime time.Time, con
return
}
- if r.Method == http.MethodHead {
- w.WriteHeader(code)
- return
- }
+ w.WriteHeader(code)
if r.Method != http.MethodHead {
- if _, err := io.Copy(w, content); err != nil {
- errortracking.Capture(err, errortracking.WithRequest(r), errortracking.WithStackTrace())
- logging.LogRequest(r).WithError(err).Error("error serving content")
- httperrors.Serve500(w)
- }
+ io.Copy(w, content)
}
}