[OpenSER-Users] Why every body return "404 Not Found" instead of "480 Not Available"?
Iñaki Baz Castillo
ibc at in.ilimit.es
Wed Mar 5 11:14:47 CET 2008
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
ibc at in.ilimit.es
More information about the Users
mailing list