El Wednesday 05 March 2008 11:04:04 Iñaki Baz Castillo escribió:

> Why then every body suggest to reply "404 Not Found" when
> "lookup(location)" returns -1? For example, the "registrar" module doc
> suggests it:
>
>   Example 1-22. lookup usage
>     lookup("location");
>     switch ($?) {
>       case -1:
>       case -3:
>           sl_send_reply("404", "Not Found");
>           exit;
>       case -2:
>           sl_send_reply("405", "Not Found");
>           exit;
>     };


IMHO it should be:

  if ( ! does_uri_exist()) {
        ## User doesn't exit here.
        sl_send_reply("404", "Not Found");
        exit;
  }

  if ( ! lookup("location")) {
        ## User does exist, but it not registered now.
        sl_send_reply("480", "Not Available Now");
        exit;
  }


-- 
Iñaki Baz Castillo
[EMAIL PROTECTED]

_______________________________________________
Users mailing list
[email protected]
http://lists.openser.org/cgi-bin/mailman/listinfo/users

Reply via email to