Help for this page

Select Code to Download


  1. or download this
    sub msg {
        $msg_num = @_[0];
        $msg_txt = "$msg_num $msgs{$msg_num}";
        print "HTTP/1.0 $msg_txt\n";
    }
    
  2. or download this
    %msgs = ("200", "OK", 
             "400", "Bad Request",
             "403", "Forbidden", 
             "404", "Not Found", 
             "500", "Internal Server Error");
    
  3. or download this
    &msg(400);
    
  4. or download this
    HTTP/1.0 400 Bad Request
    
  5. or download this
    if ($proto ne "HTTP/1.0") { 
        &msg(400); 
    }
    
  6. or download this
    HTTP/1.0 400