fix: fixed crash when gzip was enabled

This commit is contained in:
Torkel Ödegaard 2017-05-22 14:09:54 +02:00
parent a64c06d02c
commit 7c50563f0f
5 changed files with 12 additions and 16 deletions

View File

@ -2,6 +2,7 @@
## Bug fixes
* **Gzip**: Fixed crash when gzip was enabled [#8380](https://github.com/grafana/grafana/issues/8380)
* **Graphite**: Fixed issue with Toggle edit mode did in query editor [#8377](https://github.com/grafana/grafana/issues/8377)
* **Alerting**: Fixed issue with state history not showing query execution errors [#8412](https://github.com/grafana/grafana/issues/8412)
* **Alerting**: Fixed issue with missing state history events/annotations when using sqlite3 database [#7992](https://github.com/grafana/grafana/issues/7992)

View File

@ -28,7 +28,7 @@
<div class="grafana-info-box">
<h5>User Permission</h5>
<p>
The database user should only be granted SELECT permissions on the specified database & tables you want to query.
The database user should only be granted SELECT permissions on the specified database &amp; tables you want to query.
Grafana does not validate that queries are safe so queries can contain any SQL statement. For example, statements
like <code>USE otherdb;</code> and <code>DROP TABLE user;</code> would be executed. To protect against this we
<strong>Highly</strong> recommmend you create a specific MySQL user with restricted permissions.

View File

@ -1,14 +0,0 @@
sudo: false
language: go
go:
- 1.3
- 1.4
- 1.5
- tip
script: go test -v -cover -race
notifications:
email:
- u@gogs.io

View File

@ -86,7 +86,10 @@ func Gziper(options ...Options) macaron.Handler {
gzw := gzipResponseWriter{gz, ctx.Resp}
ctx.Resp = gzw
ctx.MapTo(gzw, (*http.ResponseWriter)(nil))
if ctx.Render != nil {
// Check if render middleware has been registered,
// if yes, we need to modify ResponseWriter for it as well.
if _, ok := ctx.Render.(*macaron.DummyRender); !ok {
ctx.Render.SetResponseWriter(gzw)
}

6
vendor/vendor.json vendored
View File

@ -370,6 +370,12 @@
"revision": "48920167fa152d02f228cfbece7e0f1e452d200a",
"revisionTime": "2016-12-22T07:05:54Z"
},
{
"checksumSHA1": "Rp4MJ0xFAy00EC0zlnwCpTEdYY8=",
"path": "github.com/go-macaron/gzip",
"revision": "cad1c6580a07c56f5f6bc52d66002a05985c5854",
"revisionTime": "2016-02-22T04:36:47Z"
},
{
"checksumSHA1": "y0olVbiMQ6/UOa/eh52XYnies90=",
"path": "github.com/go-macaron/inject",