Switch LogOf from panicking when logger is missing to creating logger with the defaults.

Update CORS tests to a table-based test and cover more cases.
This commit is contained in:
Jessica Forrester
2014-09-09 17:05:18 -04:00
parent becf6ca4e7
commit 0cac1c5f79
7 changed files with 85 additions and 92 deletions

View File

@@ -127,7 +127,7 @@ func (w *WatchServer) HandleWS(ws *websocket.Conn) {
// ServeHTTP serves a series of JSON encoded events via straight HTTP with
// Transfer-Encoding: chunked.
func (self *WatchServer) ServeHTTP(w http.ResponseWriter, req *http.Request) {
loggedW := httplog.FindOrCreateLogOf(req, &w)
loggedW := httplog.LogOf(req, w)
w = httplog.Unlogged(w)
cn, ok := w.(http.CloseNotifier)