Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoTileLeftBehind should return 404s #235

Merged
merged 1 commit into from Sep 25, 2015
Merged

Conversation

mojodna
Copy link
Contributor

@mojodna mojodna commented Sep 25, 2015

NoTileLeftBehind is intended to bypass caches. It does for local caches, but it inherits the default rendering behavior, which is to return a 200 HTTP response. This means that empty tiles (not intended to be cached) are treated as cacheable by downstream requestors.

`NoTileLeftBehind` is intended to bypass caches. It does for local caches, but it inherits the default rendering behavior, which is to return a 200 HTTP response. This means that empty tiles (not intended to be cached) are treated as cacheable by downstream requestors.
rburhum added a commit that referenced this pull request Sep 25, 2015
NoTileLeftBehind should return 404s
@rburhum rburhum merged commit 2912716 into TileStache:master Sep 25, 2015
@rburhum
Copy link
Contributor

rburhum commented Sep 25, 2015

Makes sense

@mojodna mojodna deleted the patch-2 branch September 29, 2015 04:52
@mojodna
Copy link
Contributor Author

mojodna commented Sep 29, 2015

I just realized a slight problem with this: NoTileLeftBehind includes a tile attribute which is intended to pass through whatever value is intended to be displayed. This behavior is potentially useful (Proxy-provided tiles which have max-age=0 or no-cache Cache-Control headers).

After #236 (which was the fundamental problem I was trying to address with this), it may make sense to revert to the original behavior (return 200s) and add Cache-Control: no-cache to discourage downstream caches from treating it as a complete response.

In other words, bounds checks (hard errors) should be treated differently from intermittent errors (which may return content, even if it's not intended to last), the status quo prior to this PR.

Thoughts?

@juliomalegria
Copy link
Contributor

I think the answer for this one depends on what we decide to do in #236.

mojodna added a commit to mojodna/TileStache that referenced this pull request Oct 21, 2015
@mojodna mojodna mentioned this pull request Oct 21, 2015
@mojodna
Copy link
Contributor Author

mojodna commented Oct 21, 2015

After letting this soak in for a while, I'm really of the opinion that this PR is wrong. #238 reverts it, #239 adds Cache-Control: no-cache headers to match the intent of NoTileLeftBehind.

#236 can remain as a separate question. I'm also hoping to submit some patches to the Proxy provider to respect the intent of upstream providers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants