tests/testserver/apache2/testdata/www/cgi-bin/http-delete.cgi
raw| 1 | #!/usr/bin/perl |
| 2 | |
| 3 | use CGI; |
| 4 | |
| 5 | if ($ENV{'REQUEST_METHOD'} eq "DELETE") { |
| 6 | $queryString = $ENV{'QUERY_STRING'}; |
| 7 | if ($queryString eq "200-ok") { |
| 8 | $returnCode = 200; |
| 9 | } elsif ($queryString eq "202-accepted") { |
| 10 | $returnCode = 202; |
| 11 | } elsif ($queryString eq "204-no-content") { |
| 12 | $returnCode = 204; |
| 13 | } else { |
| 14 | $returnCode = 404; |
| 15 | } |
| 16 | } else { |
| 17 | # 405 = Method Not Allowed |
| 18 | $returnCode = 405; |
| 19 | } |
| 20 | |
| 21 | $q = new CGI; |
| 22 | print $q->header(-status=>$returnCode); |