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:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-11-24 13:29:53 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-11-24 13:29:53 +0300
commit5ffd39e41866614de47ff427d3156062a6879e1c (patch)
tree7c4b031596057329ca5dc3b7a406d2b631a11c7d /internal/domain
parentbc61f03703dffb79c3d9d887385b968315362caa (diff)
Respond with 502 if a domain can not be retrieved from a source
Diffstat (limited to 'internal/domain')
-rw-r--r--internal/domain/domain.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/internal/domain/domain.go b/internal/domain/domain.go
index f7eba5ca..28eb3196 100644
--- a/internal/domain/domain.go
+++ b/internal/domain/domain.go
@@ -162,10 +162,8 @@ func (d *Domain) EnsureCertificate() (*tls.Certificate, error) {
// ServeFileHTTP returns true if something was served, false if not.
func (d *Domain) ServeFileHTTP(w http.ResponseWriter, r *http.Request) bool {
if d.isUnconfigured() || !d.HasLookupPath(r) {
- // TODO: this seems to be wrong:
- // as we should rather return false,
- // and fallback to `ServeNotFoundHTTP`
- // to handle this case
+ // TODO: this seems to be wrong: as we should rather return false, and
+ // fallback to `ServeNotFoundHTTP` to handle this case
httperrors.Serve404(w)
return true
}