summaryrefslogtreecommitdiff
path: root/pinyweb/cgi-bin/checkconstraint.cgi
diff options
context:
space:
mode:
authorjoanofarctangent@gmail.com <iduffe@dev.piny.svcs.cs.pdx.edu>2011-01-18 20:21:00 -0800
committerjoanofarctangent@gmail.com <iduffe@dev.piny.svcs.cs.pdx.edu>2011-01-18 20:21:00 -0800
commitfc124e917e63e8f16653fcd603fe7bf99ec9d198 (patch)
tree8dd650caae5ea522ddfd493790dd1867683d4e40 /pinyweb/cgi-bin/checkconstraint.cgi
parent8e32447f959402bc7b843b4828d35a45aec8b6e9 (diff)
parenta586352a0c9e9387987a1645842f4636c65f48be (diff)
downloadpiny-code-fc124e917e63e8f16653fcd603fe7bf99ec9d198.tar.gz
piny-code-fc124e917e63e8f16653fcd603fe7bf99ec9d198.zip
Merge branch 'master' of piny.be:/srv/git/piny-code
Diffstat (limited to 'pinyweb/cgi-bin/checkconstraint.cgi')
-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 {