On Feb 13, 2008 10:09 PM, Danek Duvall <[EMAIL PROTECTED]> wrote:
> On Wed, Feb 13, 2008 at 09:48:17PM -0600, Shawn Walker wrote:
>
> > * Consolidate the check in publish.py to a single function, so the
> > status checks can at least be maintained easier:
>
> I'd be fine with that.

Ok, that's the approach I'll take.

> > Leave the check here alone:
> > util/distro-import/solaris.py:377:        if status / 100 in (4, 5) or not 
> > id:
>
> Yup; that's gonna go away.

Got it.

> > > two if-tests into a method if you want, but if you end up testing for
> > > each of the enumerated, named 4xx and 5xx codes in httplib, then you'll
> > > end up not catching other codes we might end up returning.
> >
> > Why would we return codes that don't match up with the enumerated set?
>
> I'm reserving the right to have the server return arbitrary 2xx, 4xx, and
> 5xx codes if none of the ones defined by the HTTP spec are sufficient for
> our purposes.  If someone would like to counter that this is not
> sufficiently RESTful or otherwise an abuse of the HTTP spec, I'm open to
> that argument.  Otherwise, if I want to return 508 because nothing else
> fits, then I'm going to return 508, and a check against the enumerated
> values isn't going to cut it.

>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].

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.

Cheers,
-- 
Shawn Walker, Software and Systems Analyst
http://binarycrusader.blogspot.com/

"To err is human -- and to blame it on a computer is even more so." -
Robert Orben

[1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6.1.1
[2] http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to