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

Fix if unmodified pre 1.3.0 #1216

Merged
merged 2 commits into from
Jul 19, 2023
Merged

Conversation

yohanboniface
Copy link
Member

Prior to 1.3.0, uMap was not setting the gzip mtime, so it was
whatever the time it get requested at first.
Since 1.3.0:

  • when creating the geojson.gzip, we also force its mtime to be
    the geojson one
  • we replaced If-Match by If-Unmodified, which relies on Last-Modified

When uMap is served by a proxy like Nginx (and X-Accel-Redirect),
and if user accepts gzip, then the Last-Modified would be the gzip
one, not the flat geojson one.

So when comparing that value in a subsequent update, we need to
compare with the correct value.

fix #1212

Prior to 1.3.0, uMap was not setting the gzip mtime, so it was
whatever the time it get requested at first.
Since 1.3.0:
- when creating the geojson.gzip, we also force its mtime to be
  the geojson one
- we replaced If-Match by If-Unmodified, which relies on Last-Modified

When uMap is served by a proxy like Nginx (and X-Accel-Redirect),
and if user accepts gzip, then the Last-Modified would be the gzip
one, not the flat geojson one.

So when comparing that value in a subsequent update, we need to
compare with the correct value.

fix #1212
@yohanboniface yohanboniface merged commit b056641 into master Jul 19, 2023
@yohanboniface yohanboniface deleted the fix-if-unmodified-pre-1.3.0 branch July 19, 2023 13:22
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.

Can't edit map (Woops! Someone else seems to have edited the data.)
1 participant