mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2024-11-17 23:58:17 +01:00
If we can't stat a base tile we can't deliver a sub tile -> 404.
This commit is contained in:
parent
c42be33ba9
commit
44a0d097c0
@ -117,17 +117,18 @@ func main() {
|
|||||||
var err error
|
var err error
|
||||||
|
|
||||||
if ifNoneMatch := r.Header.Get("If-None-Match"); ifNoneMatch != "" {
|
if ifNoneMatch := r.Header.Get("If-None-Match"); ifNoneMatch != "" {
|
||||||
if etag, err = createETag(baseTile); err == nil {
|
if etag, err = createETag(baseTile); err != nil {
|
||||||
|
http.NotFound(rw, r)
|
||||||
|
return
|
||||||
|
}
|
||||||
if ifNoneMatch == etag {
|
if ifNoneMatch == etag {
|
||||||
http.Error(rw, http.StatusText(http.StatusNotModified), http.StatusNotModified)
|
http.Error(rw, http.StatusText(http.StatusNotModified), http.StatusNotModified)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
img := common.LoadPNG(baseTile)
|
img := common.LoadPNG(baseTile)
|
||||||
|
|
||||||
type subImage interface {
|
type subImage interface {
|
||||||
image.Image
|
|
||||||
SubImage(image.Rectangle) image.Image
|
SubImage(image.Rectangle) image.Image
|
||||||
}
|
}
|
||||||
var si subImage
|
var si subImage
|
||||||
|
Loading…
Reference in New Issue
Block a user