Danek Duvall wrote:
On Wed, Feb 13, 2008 at 10:24:52PM -0600, Shawn Walker wrote:

From my reading of the relevant rfc(s), it is perfectly acceptable to
use your own codes [1], you just have to the right "class" for them
[2].

That's the attitude I've been taking, too, but not having been steeped all
that much in REST, I may be missing something that says "return 2xx codes
as much as possible, with errors embedded in headers".

My only thought is that, if that happens, we would want to have our
own module for all of the codes (including httplib's). That way, every
module would go through a central one for response code values and we
would have full control over them and consistency.

Yup; definitely.

In a past project I had a need to return 'special' response codes for certain internal conditions. Rather than using new codes in existing HTTP ranges, I started from 600.

Personally, I think this is an elegant and natural solution to situations where you need to give the client indication of a specific condition on the server.

Trev

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to