Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Roman Lacko
gitlab_api
Commits
fd732644
Commit
fd732644
authored
Nov 01, 2016
by
Roman Lacko
Committed by
Fakultni administrativa
Nov 01, 2016
Browse files
API.pm: undef query parameters should not be considered "extra"
parent
78f7852c
Changes
1
Hide whitespace changes
Inline
Side-by-side
GitLab/API.pm
View file @
fd732644
...
...
@@ -162,7 +162,7 @@ sub create_uri {
# add query parameters
foreach
my
$param
(
@
{
$tmpl
->
{
query
}
//
[]
})
{
if
(
defined
$args
->
{
$param
})
{
if
(
exists
$args
->
{
$param
})
{
$uri
->
query_param
(
$param
=>
$args
->
{
$param
});
delete
$args
->
{
$param
};
}
...
...
@@ -201,10 +201,18 @@ sub exec_request {
delete
@
{
$args
}{
@rtkeys
};
if
(
$log
->
is_debug
)
{
my
$argstr
=
join
"
,
",
map
{
"
$_
=>
"
.
(
$_
eq
"
password
"
?
"
<redacted>
"
:
"
\"
$args
->{
$_
}
\"
")
}
(
keys
%$args
);
my
$rtstr
=
join
"
,
",
map
{
"
$_
=>
$rtargs
->{
$_
}
"
}
(
@rtkeys
);
$log
->
debug
("
called GitLab::API::
$tmpl
->{name}(
$argstr
)
");
$log
->
debug
("
request options: [
$rtstr
]
");
my
@bits
;
for
my
$key
(
keys
%$args
)
{
my
$value
=
$key
eq
"
password
"
?
"
<redacted>
"
:
!
defined
$args
->
{
$key
}
?
"
<undef>
"
:
"
\"
$args
->{
$key
}
\"
";
push
@bits
,
"
$key
=>
$value
";
}
push
@bits
,
"
[
$_
=>
$rtargs
->{
$_
}]
"
foreach
@rtkeys
;
$log
->
debug
("
called GitLab::API::
$tmpl
->{name}(
"
.
(
join
"
,
",
@bits
)
.
"
)
");
}
my
$uri
=
$self
->
create_uri
(
$tmpl
,
$args
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment