summaryrefslogtreecommitdiff
path: root/src/rhctl
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-11-10 18:18:10 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-11-10 18:18:10 (GMT)
commit8f39244ad12e47121324f881b9caa651d8d7e85f (patch)
treeb24505556f8b8686420850b31069b2036258a4fb /src/rhctl
parent82e6635fe1444bd2d5fd1b340f9c51ca6ea925ca (diff)
return actual http status code on error
Diffstat (limited to 'src/rhctl')
-rw-r--r--src/rhctl/web.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rhctl/web.go b/src/rhctl/web.go
index c83a28e..2c5094c 100644
--- a/src/rhctl/web.go
+++ b/src/rhctl/web.go
@@ -54,7 +54,7 @@ type webError struct {
}
func webSendErrorResponse(w http.ResponseWriter, status int, error string) {
- webSendResponse(w, http.StatusOK, webError{ResponseCode: status, ErrorString: error})
+ webSendResponse(w, status, webError{ResponseCode: status, ErrorString: error})
}
func webGetStateHandler(ctrl *SwitchControl, w http.ResponseWriter, r *http.Request) {
@@ -87,7 +87,7 @@ func WebInit(conf *Config, ctrl *SwitchControl) (web *WebInterface) {
web = &WebInterface{}
if conf.Clients.Web.StaticDir != "" {
- rhdl.Printf("Web: will serving static files from '%s'", conf.Clients.Web.StaticDir)
+ rhdl.Printf("Web: serving static files from '%s'", conf.Clients.Web.StaticDir)
http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir(conf.Clients.Web.StaticDir))))
}
http.Handle("/socket", webHandler{ctrl, webSocketHandler})