summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpinyweb/cgi-bin/checkconstraint.cgi6
1 files changed, 3 insertions, 3 deletions
diff --git a/pinyweb/cgi-bin/checkconstraint.cgi b/pinyweb/cgi-bin/checkconstraint.cgi
index 4ff939c..e0a59c3 100755
--- a/pinyweb/cgi-bin/checkconstraint.cgi
+++ b/pinyweb/cgi-bin/checkconstraint.cgi
@@ -12,21 +12,21 @@ use Piny;
my $q = CGI->new( );
if ( $q->request_method( ) eq "OPTIONS" ) {
- print "Status: 204 No Content\nAccess-Control-Allow-Headers: *\nAccess-Control-Allow-Methods: GET, OPTIONS, POST\nAccess-Control-Allow-Origin: *\nAccess-Control-Max-Age: 3600\n\n";
+ print "Status: 200 OK\nAccess-Control-Allow-Headers: *\nAccess-Control-Allow-Methods: GET, OPTIONS, POST\nAccess-Control-Allow-Origin: *\nAccess-Control-Max-Age: 3600\nContent-Type: text/plain\n\n";
} else {
my $type = $q->param( 't' );
my $value = $q->param( 'v' );
if ( not defined $type or not defined $value ) {
- print "Status: 400 Bad Request\nContent-type: application/json\n\n";
+ print "Status: 200 OK\nContent-type: application/json\n\n";
print encode_json( { "ok" => JSON::false, "msg" => "Unable to validate due to client-side error, please reload this page. Required parameter missing." } );
} else {
my $constraint = find_type_constraint( $type );
if ( not defined $constraint ) {
- print "Status: 400 Bad Request\nContent-type: application/json\n\n";
+ print "Status: 200 OK\nContent-type: application/json\n\n";
print encode_json( { "ok" => JSON::false, "msg" => "Unable to validate due to client-side error, please reload this page. Invalid constraint name." } );
} else {