You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While writing redirects, I continue to make two errors routinely when copying from my Google Analytics's 404 data: I accidentally leave in the root '/', and I try to make redirects where the original error is invalid as a file because it's too long. These both cause gwern.net builds to fail, often while unattended, when it tries to create invalid files.
The attached patch adds two more checks for these:
It is possible for redirects to fail these checks and still be valid: a root offender could hypothetically still work if it was written as something like ('/home/gwern/wiki/_site/foo', '/foobar'), and some filesystems allow >255 character filenames. But anyone writing redirects like those should seriously rethink what they are doing, as the former is perverse and the latter is nonportable / FS-specific.
The text was updated successfully, but these errors were encountered:
While writing redirects, I continue to make two errors routinely when copying from my Google Analytics's 404 data: I accidentally leave in the root '/', and I try to make redirects where the original error is invalid as a file because it's too long. These both cause
gwern.net
builds to fail, often while unattended, when it tries to create invalid files.The attached patch adds two more checks for these:
0001-Redirect-checks-for-absolute-path-redirects-typicall.patch.txt
It is possible for redirects to fail these checks and still be valid: a root offender could hypothetically still work if it was written as something like
('/home/gwern/wiki/_site/foo', '/foobar')
, and some filesystems allow >255 character filenames. But anyone writing redirects like those should seriously rethink what they are doing, as the former is perverse and the latter is nonportable / FS-specific.The text was updated successfully, but these errors were encountered: