Closed Bug 1664771 Opened 5 years ago Closed 5 years ago

Don't set "Expires" header

Categories

(Developer Infrastructure :: Source Documentation, defect)

defect

Tracking

(firefox82 fixed)

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: marco, Assigned: ahal)

References

Details

Attachments

(1 file)

The "Expires" header doesn't actually specify when an S3 object will be removed, but (from https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html) it specifies The date and time at which the object is no longer cacheable. For more information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21 ..

So https://searchfox.org/mozilla-central/rev/62c443a7c801ba9672de34c2867ec1665a4bbe67/tools/moztreedocs/upload.py#148-158 can be confusing and doesn't have the intended effect, it only makes S3 notify the browser that the object must be refreshed.

The only way to expire objects is to define object expiration rules in the lifecycle configuration policy of the bucket (https://aws.amazon.com/blogs/aws/amazon-s3-object-expiration/).

Andrew, are you the one who can take care of that? thanks

Flags: needinfo?(ahal)

Sure, I'll take a look.

Assignee: nobody → ahal
Status: NEW → ASSIGNED
Flags: needinfo?(ahal)

As per:
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html

This header doesn't actually control when an object gets deleted. Rather it is when the object
expires in the browser cache (i.e, when the expiry is hit, the browser will reload the object).

Remove this as it's only causing confusion.

Pushed by ahalberstadt@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/367c0d24e6bd [docs] Remove bogus 'Expires' header when uploading docs, r=firefox-source-docs-reviewers,championshuttler
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: