forked from lix-project/hydra
* Escape +',
=' and `?' in NAR URIS in manifests. Otherwise you get
an incorrect URI that gives a 410 error.
This commit is contained in:
parent
6dd53655a5
commit
a7d132ff2a
|
@ -22,8 +22,15 @@ sub process {
|
||||||
|
|
||||||
foreach my $path (@paths) {
|
foreach my $path (@paths) {
|
||||||
my ($hash, $deriver, $refs) = queryPathInfo $path;
|
my ($hash, $deriver, $refs) = queryPathInfo $path;
|
||||||
|
|
||||||
|
# Escape the characters that are allowed to appear in a Nix
|
||||||
|
# path name but have special meaning in a URI.
|
||||||
|
my $escaped = $path;
|
||||||
|
$escaped =~ s/\+/%2b/g;
|
||||||
|
$escaped =~ s/\=/%3d/g;
|
||||||
|
$escaped =~ s/\?/%3f/g;
|
||||||
|
|
||||||
my $url = $c->stash->{narBase} . $path;
|
my $url = $c->stash->{narBase} . $escaped;
|
||||||
|
|
||||||
$manifest .=
|
$manifest .=
|
||||||
"{\n" .
|
"{\n" .
|
||||||
|
|
Loading…
Reference in a new issue