Skip to content

Commit

Permalink
Item13897: Enable more JSON tests.
Browse files Browse the repository at this point in the history
Fix one bug - URL method was overriding the JSON posted method.

One test fails - need to confirm on master.  json redirectto parameter
appears to be encoded.  Anchor # is encoded as %23.
  • Loading branch information
gac410 committed Nov 1, 2016
1 parent 260a67e commit dbdb98a
Show file tree
Hide file tree
Showing 2 changed files with 246 additions and 87 deletions.
5 changes: 3 additions & 2 deletions JsonRpcContrib/lib/Foswiki/Request/JSON.pm
Expand Up @@ -449,7 +449,7 @@ sub _establishNamespace {
$this->jsonerror(
new Foswiki::Contrib::JsonRpcContrib::Error(
code => -32600,
text => "Invalid Namespace / method FOO"
text => "Invalid Namespace / method"
)
);
return;
Expand All @@ -458,7 +458,8 @@ sub _establishNamespace {
my $namespace = $1;
my $method = $2;

if ( defined $method ) {
# Don't set the method if it has already been established by POSTDATA
if ( defined $method && !$this->jsonmethod ) {
$this->jsonmethod($method);
}

Expand Down

0 comments on commit dbdb98a

Please sign in to comment.