projects
/
pve-common.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a6766fe
)
rest: register method: allow minus in path template parameter names
author
Thomas Lamprecht
<t.lamprecht@proxmox.com>
Tue, 17 Nov 2020 15:05:20 +0000
(16:05 +0100)
committer
Thomas Lamprecht
<t.lamprecht@proxmox.com>
Tue, 17 Nov 2020 15:20:54 +0000
(16:20 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/RESTHandler.pm
patch
|
blob
|
blame
|
history
diff --git
a/src/PVE/RESTHandler.pm
b/src/PVE/RESTHandler.pm
index b0bb431d295ece5f1b9a747371e96c337325c977..1eea32ac57bef2701e54d3b53ef61396f16f145f 100644
(file)
--- a/
src/PVE/RESTHandler.pm
+++ b/
src/PVE/RESTHandler.pm
@@
-255,7
+255,7
@@
sub register_method {
foreach my $comp (split(/\/+/, $info->{path})) {
die "$errprefix path compoment has zero length\n" if $comp eq '';
my ($name, $regex);
- if ($comp =~ m/^\{(
\w
+)(?::(.*))?\}$/) {
+ if ($comp =~ m/^\{(
[\w-]
+)(?::(.*))?\}$/) {
$name = $1;
$regex = $2 ? $2 : '\S+';
push @$match_re, $regex;