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

Redirect status #357

Closed
rsbivand opened this issue Mar 17, 2023 · 3 comments
Closed

Redirect status #357

rsbivand opened this issue Mar 17, 2023 · 3 comments

Comments

@rsbivand
Copy link

It is of course best to link to the site using for example https://grass.osgeo.org/grass-stable/manuals/variables.html, where grass-stable redirects to the current stable release. However, redirection is given as permanent:

$ curl -o - -I https://grass.osgeo.org/grass-stable/manuals/variables.html
HTTP/1.1 301 Moved Permanently
Server: nginx/1.18.0 (Ubuntu)
Date: Fri, 17 Mar 2023 19:28:48 GMT
Content-Type: text/html; charset=iso-8859-1
Connection: keep-alive
Location: https://grass.osgeo.org/grass82/manuals/variables.html
Front-End-Https: on

In CRAN/R, permanent redirection is not permitted in URLs in package documentation, so the current release (now grass82) has to be hard-coded. Could the server-side redirection infrastructure reply 307 instead of 301? Then rgrass could use grass-stable, not grass82, which means that the maintainer would avoid havng to update the GRASS version number each time it changes.

@neteler
Copy link
Member

neteler commented Mar 17, 2023

Likely yes, I'll look into this.

@neteler
Copy link
Member

neteler commented Mar 18, 2023

I have updated the related config lines to:

## latest "stable" redirect:
# Jun 2022 grass-stable -> grass82
    Redirect 307 /grass-stable/ https://grass.osgeo.org/grass82/
## latest "devel" redirect:
# Jun 2022 grass-devel -> grass83
    Redirect 307 /grass-devel/ https://grass.osgeo.org/grass83/
## latest "legacy" redirect:
# Oct 2022 grass-legacy -> grass78
    Redirect 307 /grass-legacy/ https://grass.osgeo.org/grass78/

Does this now work for you?

@rsbivand
Copy link
Author

Yes, now:

$ curl -o - -I https://grass.osgeo.org/grass-stable/manuals/variables.html
HTTP/1.1 307 Temporary Redirect
Server: nginx/1.18.0 (Ubuntu)
Date: Sat, 18 Mar 2023 12:10:46 GMT
Content-Type: text/html; charset=iso-8859-1
Connection: keep-alive
Location: https://grass.osgeo.org/grass82/manuals/variables.html
Front-End-Https: on

The warning on CRAN checking is gone too, as expected. Thanks!

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

No branches or pull requests

2 participants