diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-11-10 18:18:10 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-11-10 18:18:10 (GMT) |
commit | 8f39244ad12e47121324f881b9caa651d8d7e85f (patch) | |
tree | b24505556f8b8686420850b31069b2036258a4fb /src/rhctl | |
parent | 82e6635fe1444bd2d5fd1b340f9c51ca6ea925ca (diff) |
return actual http status code on error
Diffstat (limited to 'src/rhctl')
-rw-r--r-- | src/rhctl/web.go | 4 |
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}) |