Danek Duvall wrote: > On Mon, Aug 18, 2008 at 02:47:19PM -0500, Shawn Walker wrote: > >>> Perhaps the except statement should be more specific? (IndexError, >>> IllegalDotSequence, IllegalVersion) >> I initially took that approach, but abandoned it for reasons I explain >> later. > > I don't mean in order to be able to send a 400 instead of a 404, just so > that you don't inadvertently catch KeyboardInterrupt or SystemExit. I'm > always wary of a bare except statement.
Fair enough. I've fixed that then and I'll putback soon once I retest. I had to add AssertionError as well since modules/fmri.py does the "assert self.version != None". >> I initially went for the 400 Bad Request response using specific >> exceptions. >> >> However, from a RESTful perspective, isn't a 404 more appropriate (since >> they have to provide a full fmri)? It would seem to me that if we were >> serving /manifest/ via a "standard" web server or cdn, that we should just >> treat it is a "resource request." So, malformed uris simply don't exist >> (404). >> >> Agree, disagree, torn as I am? > > Fair argument. I'm don't care too much, and we can always change it later > if we find a good reason to. Indeed. Thanks, -- Shawn Walker _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
