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

HTTP response fixes (increase cacheability) #67

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

HTTP response fixes (increase cacheability) #67

wants to merge 3 commits into from

Conversation

da2x
Copy link

@da2x da2x commented Sep 3, 2015

The 301 status means clients should never use the redirector to ask for a new mirror again, and direct all future requests to the one mirror they were redirected to on the first request. This is not what is intended here. A 307 temporary redirect is the correct response. Fixes #65.

Let clients and proxies cache responses from the redirector for 7:30 minutes instead of refetching the redirect from the redirector on every request within a short time frame. Makes the redirector play nicer with caching proxies who can handle mass-updates on a local network locally without refetching the remote resource for every request. Fixes #66.

See also my blog post.

Finally, add a Server header as it’s one of the few headers required by HTTP. Gave it the vanity name “http-redirector”.

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.

1 participant