-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Proxito: inactive versions produce infinite redirect when the HTML exists in the storage #9335
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
Comments
This also looks like we failed to remove the files from storage when the version was inactivated. |
Yeah, we have a lot of these. They are different problems, tho, and I think we should fix both. However, I'm sure there will be always situations where we fail to delete an inactive version from the storage. |
Looks like we are deleting files when the version is deactivated from the form, but not from the API. readthedocs.org/readthedocs/projects/views/private.py Lines 213 to 224 in a2ca1af
Also, we should probably always call the delete function if the version isn't active without checking if the form has changed (just in case the deletion failed, users can just press save). Also, wonder if we could move this to the save method, but maybe we didn't put it there since it's called too many times (even for an inactive version)? |
Presumably related to this issue, I'm seeing an endless redirect for epub download urls: $ curl -L https://domdf-python-tools.readthedocs.io/_/downloads/en/stable/epub/
curl: (47) Maximum (50) redirects followed For this project I only have HTML and PDF builds enabled. PDF URL works fine. This project used to have epub builds enabled, but the problem still presents itself for projects where they were disabled from the beginning. |
Related to #9468 |
With #10153, this shouldn't happen anymore. Previously we were raising a 404 (inactive version), then our 404 handler would see that there is an index file and redirect again to the same path (index file redirect). Now we check that the URL already ends with But we are missing deleting the files from a version when it's deactivated from the API #9335 (comment). |
Closing this in favor of #10221, since the original problem is solved. |
It seems that when a version is
active=False
but its HTML files exist in the storage, we get an infinite redirect:El Proxito should return 404 in these situations.
Reference: https://twitter.com/remram44/status/1536882673821655040
Reference: https://github.com/readthedocs/readthedocs-ops/issues/1139
Reference: #9109
The text was updated successfully, but these errors were encountered: