return 304 if a tile doesn't exist (nicer than having the browser spammed with errors)
This commit is contained in:
parent
085776d42b
commit
6fa826baa2
1 changed files with 3 additions and 14 deletions
|
|
@ -61,20 +61,9 @@ private suspend fun PipelineContext<Unit, ApplicationCall>.handleTileRequest(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
call.respond(HttpStatusCode.NotFound)
|
// It's not a client or server error to request a non-existent tile, it just doesn't exist
|
||||||
// // It's not a client error to request this tile, it just doesn't exist (yet). So return 304?
|
// (yet). So return 304.
|
||||||
// call.response.cacheControl(CacheControl.NoStore(null))
|
call.respond(HttpStatusCode.NotModified)
|
||||||
//
|
|
||||||
// HeadersBuilder(size = 2).apply {
|
|
||||||
// EntityTagVersion(System.currentTimeMillis().hashCode().toString())
|
|
||||||
// .appendHeadersTo(this)
|
|
||||||
// LastModifiedVersion(System.currentTimeMillis())
|
|
||||||
// .appendHeadersTo(this)
|
|
||||||
// }.build().flattenForEach { name, value ->
|
|
||||||
// call.response.header(name, value)
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// call.respond(HttpStatusCode.NotModified)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue