chronograf/server
Tim Raymond 3177d4ef3c Bypass URLPrefixer if http.Flusher is unavailable
In certain situations, the http.ResponseWriter passed to the URLPrefixer
may not be an http.Flusher. A simple case where this may occur is if the
Prefixer has been wrapped up in a middleware where the above middleware
wraps the ResponseWriter in a ResponseWriter that doesn't implement the
Flush method.

Previously, the Prefixer would error, which would cause the request to
fail with a 500. Instead, the condition is logged and the request is
passed unmodified to the next middleware in the chain. This effectively
disables prefixing for requests where the above ResponseWriter is not an
http.Flusher.

Misc. Changes
=============

- Some tests for "builders" were moved to server/builders_test.go to
  follow with convention. We've been naming files after different things
  under test and leaving the file matching the package name for support
  objects-in this case a mock logger was added to that file.
2017-04-04 10:33:14 -04:00
..
assets.go Move URLPrefixer setup to mux, add default 2017-01-27 19:14:21 -05:00
builders.go Allow InfluxDB and Kapacitor configuration via ENV vars or CLI options (#1129) 2017-03-30 09:48:04 -07:00
builders_test.go Bypass URLPrefixer if http.Flusher is unavailable 2017-04-04 10:33:14 -04:00
dashboards.go Fix go dependency breaking master build 2017-03-24 13:34:56 -07:00
dashboards_test.go Create a new dashboard cell; Fix remaining bugs with Overlay (#1056) 2017-03-23 17:50:21 -07:00
databases.go Update rpResponse default to isDefault 2017-03-24 10:06:59 -07:00
databases_test.go Update RP JSON default to isDefault 2017-03-24 09:58:57 -07:00
hsts.go Add HSTS handler to add headers for upcoming TLS support 2017-02-12 18:21:49 -06:00
influx.go Enhance server logging for connection errors 2017-02-24 00:34:50 -06:00
kapacitors.go Update comments for go vet 2017-02-21 21:35:24 -06:00
layout.go Remove explorations from backend server 2017-02-01 15:09:02 -06:00
layout_test.go Refactor to remove autogenerated code. 2016-10-26 22:10:52 -05:00
logger.go Fix mux paths to be hardcoded; clarify server start; fix golint 2016-10-28 11:27:06 -05:00
logout.go Add unified OAuth2 logout route redirecting to provider logout 2017-02-15 16:29:13 -06:00
mappings.go Add server error logging 2016-11-19 11:41:06 -06:00
me.go Update user/role responses to return empty arrays 2017-03-10 13:24:48 -06:00
me_test.go Update user/role responses to return empty arrays 2017-03-10 13:24:48 -06:00
mux.go Add compression for InfluxQL query responses 2017-03-28 13:10:05 -05:00
permissions.go Update user/role responses to return empty arrays 2017-03-10 13:24:48 -06:00
permissions_test.go Update user/role responses to return empty arrays 2017-03-10 13:24:48 -06:00
proxy.go Fix kapacitor base64 auth as header was built incorrectly. 2017-03-30 15:32:02 -05:00
redoc.go Miscellaneous lint cleanup 2016-12-20 12:59:56 -08:00
roles.go Update roles to check if role already exists 2017-03-10 17:24:52 -06:00
roles_test.go Update roles to check if role already exists 2017-03-10 17:24:52 -06:00
routes.go Merge branch 'master' into feature/#54-tr-enterprise-client 2017-02-23 23:26:09 -06:00
server.go Allow InfluxDB and Kapacitor configuration via ENV vars or CLI options (#1129) 2017-03-30 09:48:04 -07:00
server_test.go Bypass URLPrefixer if http.Flusher is unavailable 2017-04-04 10:33:14 -04:00
service.go Add retention policies to the database response 2017-03-23 13:53:28 -07:00
sources.go Redirect to default source when deleting sources (#1074) 2017-03-28 08:53:11 -07:00
sources_test.go Fix sources test to include databases link 2017-03-23 14:06:52 -07:00
swagger.go Miscellaneous lint cleanup 2016-12-20 12:59:56 -08:00
swagger.json Change password (#1120) 2017-03-29 17:40:46 -07:00
url_prefixer.go Bypass URLPrefixer if http.Flusher is unavailable 2017-04-04 10:33:14 -04:00
url_prefixer_test.go Bypass URLPrefixer if http.Flusher is unavailable 2017-04-04 10:33:14 -04:00
users.go Update user's roles validation 2017-03-10 18:06:06 -06:00
users_test.go Update user/role responses to return empty arrays 2017-03-10 13:24:48 -06:00
version.go Update to fix go linter issues 2017-03-06 10:11:52 -06:00