diff --git a/cmd/circologd/http.go b/cmd/circologd/http.go index 92a1a29..7962d8d 100644 --- a/cmd/circologd/http.go +++ b/cmd/circologd/http.go @@ -118,10 +118,18 @@ func getWSHandler(hub circolog.Hub) http.HandlerFunc { WriteBufferSize: 1024, } return func(w http.ResponseWriter, r *http.Request) { + render_opts, err := parseRenderParameters(r) + if err != nil { + log.Println("Error parsing:", err) + w.WriteHeader(400) + fmt.Fprintln(w, err) + return + } opts, err := parseParameters(r) if err != nil { log.Println("Error on request parameter \"l\":", err) w.WriteHeader(400) + fmt.Fprintln(w, err) return } opts.Nofollow = false @@ -156,7 +164,7 @@ func getWSHandler(hub circolog.Hub) http.HandlerFunc { if err != nil { return } - writeFormatted(w, formatSyslog, message) + writeFormatted(w, render_opts.Format, message) if err := w.Close(); err != nil { return