diff options
author | Julian Blake Kongslie <jblake@omgwallhack.org> | 2011-01-18 20:19:44 -0800 |
---|---|---|
committer | Julian Blake Kongslie <jblake@omgwallhack.org> | 2011-01-18 20:19:44 -0800 |
commit | a586352a0c9e9387987a1645842f4636c65f48be (patch) | |
tree | 7fb38b22d530854a0de4f9cf1c7cf9691b656726 /pinyweb | |
parent | 440828df27d582be10ed3d131216f9e074b6ab29 (diff) | |
download | piny-code-a586352a0c9e9387987a1645842f4636c65f48be.tar.gz piny-code-a586352a0c9e9387987a1645842f4636c65f48be.zip |
More status code changes.
Diffstat (limited to 'pinyweb')
-rwxr-xr-x | pinyweb/cgi-bin/checkconstraint.cgi | 6 |
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 { |