Requests fail when URL is too long
Closed this issue · 3 comments
dalbothek commented
Requests fail with HTTP status 500 and the following line in the memento log:
Error: ENAMETOOLONG: name too long, mkdir '/path/to/memento/.memento-cache/https___host/get__really_long_url?with=some&query=parameters'
In this case, the length of the entire URI was just 275 characters.
A suggestion: Use a (reasonably long) hash of the URL to generate the folder names. Or just truncate it, if fast lookup on the filesystem is not a requirement.
antoinechalifour commented
Nice catch! I'll try and publish a fix tonight
antoinechalifour commented
Alright @sadimusi, I just opened #31 that will fix this issue. Thanks a lot for reporting this bug 😉
dalbothek commented
Thanks a lot for the quick response! 👍 Great to see an active open source project :)