chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.main.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
routesearch: check for failure of routesearch and report XCPU specially
[ypp-sc-tools.main.git]
/
yarrg
/
web
/
qtextstringcheck
diff --git
a/yarrg/web/qtextstringcheck
b/yarrg/web/qtextstringcheck
index 4adb606ea0b2c3e25dc8251dac335a47ee24e7e6..9dce8287e208d8213418dd6432e49898c998a74a 100755
(executable)
--- a/
yarrg/web/qtextstringcheck
+++ b/
yarrg/web/qtextstringcheck
@@
-95,7
+95,7
@@
if ($chk->method_exists('execute')) {
my $sqlstmt_nqs= @sqlstmt_nqs;
my @specs= $chk->attr('multiple')
my $sqlstmt_nqs= @sqlstmt_nqs;
my @specs= $chk->attr('multiple')
- ? (split m#
[/|,]
#, $string)
+ ? (split m#
\s*[/|,]\s*
#, $string)
: ($string);
foreach my $each (@specs) {
: ($string);
foreach my $each (@specs) {
@@
-109,7
+109,7
@@
if ($chk->method_exists('execute')) {
$chk->scall_method("manyambig"),
sub {
$chk->scall_method("ambiguous",
$chk->scall_method("manyambig"),
sub {
$chk->scall_method("ambiguous",
- spec => $each, couldbe => $_[
0
])
+ spec => $each, couldbe => $_[
1
])
});
if (defined $temsg) {
$emsg= $temsg;
});
if (defined $temsg) {
$emsg= $temsg;
@@
-129,7
+129,10
@@
$emsg='' if !defined $emsg;
$debugf->("QTSC EMSG='$emsg' RESULTS='@results'");
if ($format =~ /json/) {
$debugf->("QTSC EMSG='$emsg' RESULTS='@results'");
if ($format =~ /json/) {
- $r->content_type($ctype or $format);
+ $ctype ||= $format;
+ die unless grep { $_ eq $ctype }
+ qw(application/json text/plain text/xml);
+ $r->content_type($ctype);
my $jobj= {
success => 1*!length $emsg,
show => (length $emsg ? $emsg :
my $jobj= {
success => 1*!length $emsg,
show => (length $emsg ? $emsg :