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
|
@ -23,7 +23,14 @@ sub process {
|
||||||
foreach my $path (@paths) {
|
foreach my $path (@paths) {
|
||||||
my ($hash, $deriver, $refs) = queryPathInfo $path;
|
my ($hash, $deriver, $refs) = queryPathInfo $path;
|
||||||
|
|
||||||
my $url = $c->stash->{narBase} . $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} . $escaped;
|
||||||
|
|
||||||
$manifest .=
|
$manifest .=
|
||||||
"{\n" .
|
"{\n" .
|
||||||
|
|
Loading…
Reference in a new issue