Jump to content

Template talk:Cospar

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Redirected from Template talk:Cospar/doc)

Changing the id URL to an up-to-date HTTPS URL

[edit]

From what it appears, the current URL in the template generates a sequence of two HTTP 301 redirects that lead to the actual page. For example, http://nssdc.gsfc.nasa.gov/nmc/spacecraftDisplay.do?id=1958-008A generates a 301 redirect to https://nssdc.gsfc.nasa.gov/nmc/spacecraftDisplay.do?id=1958-008A which generates another 301 redirect to the actual page at https://nssdc.gsfc.nasa.gov/nmc/spacecraft/display.action?id=1958-008A. In addition, for a number of URLs that I tested, it appears that the HTTP response headers from the second 301 redirect and the actual page include a Strict-transport-security header with a value of max-age=31536000; includeSubDomains. This would seem to indicate that changing existing HTTP URLs to HTTPS URLs should not be too much of an issue, if any. As of now, I have edited the template sandbox to use the final HTTPS URL for the id link.

I have also edited the template testcases page to include two testcases where there is a NSSDCA (NASA Space Science Data Coordinated Archive) id that consists entirely of letters, with no dashes. Examples of these NSSDCA IDs are PIONX for Pioneer P-3, PIONY for Pioneer P-30, and PIONZ for Pioneer P-31. These three IDs appear to generate the pattern of 301 redirects described previously. (Of possible note, on this Mars Society Australia page, there is a URL http://nssdc.gsfc.nasa.gov/nmc/spacecraftDisplay.do?id=MAVEN. Visiting that URL in a browser leads to an error page at the NSSDCA site.) The testcases on the template testcases page appear to work all right.

From this, it would seem useful to edit the actual template to use the HTTPS URL https://nssdc.gsfc.nasa.gov/nmc/spacecraft/display.action?id= instead of the current URL http://nssdc.gsfc.nasa.gov/nmc/spacecraftDisplay.do?id=. Such a change would reduce the number of redirects and would provide increased privacy and security for users. Thoughts? --Elegie (talk) 08:40, 4 April 2019 (UTC)[reply]

Template-protected edit request on 8 April 2020

[edit]

Kees08 asked me if it would be possible to validate the COSPAR IDs passed to this template. In the template sandbox, I have added validation that will display an error when the ID is not in the format YYYY-DDDA[A[A]]. If there is no dash in the ID, it is assumed to be an alternate format and validation is skipped. Otherwise, the ID is checked for four characters at the start that are a year between 1957 and the current year inclusive, then a dash, then 3 digits, and then 1-3 letters. There are testcases that show the effect of the validation. When an error is displayed, the page will also be added to Category:Pages with COSPAR ID errors, which I will create after the changes are merged. AntiCompositeNumber (talk) 23:06, 8 April 2020 (UTC)[reply]

To editors AntiCompositeNumber and Kees08:  done. P.I. Ellsworth  ed. put'r there 14:45, 9 April 2020 (UTC)[reply]
[edit]

COSPAR ID with single item could generate URL link, like Mariner 4. But how about two items situations (Apollo 13 and Mars 2)? 21:34, 17 December 2020 (UTC)