On Thu, Jul 22, 2010 at 05:28:43PM -0700, Shawn Walker wrote: > On 07/22/10 03:30 PM, [email protected] wrote: > >As part of my putback for updating the publication tools, I removed the > >ability for publication clients to read HTTP response bodies when they > >recieve an error. Unfortunately, this is the only way for the depot to > >provide more details about a publication failure. I had hoped the > >removal wouldn't be noticed, but it was, and the functionality is still > >needed. > > > >This webrev now retains the response body for publication operations > >that fail with HTTP 400. The additional information is printed when the > >exception is turned into a string. > > > > http://cr.opensolaris.org/~johansen/webrev-16607/ > > I tested this locally against gate tip and it worked as expected. > This is also a lot nicer than it used to be.
Thanks for looking at this. It took more testing than I expected. Aside from the changes to the fileobject to allow the caller to access the response body in an error, I also had to change the engine to continue in some error cases. Previously, if a caller specified a write-callback, the engine instructed CURL to stop immediately if a HTTP error >= 400 was seen. I had to switch this off to get the response body for the fileobj. After thinking about this some more, I'm wondering if it would actually be better to have all transactions as FAILONERROR by default, since that would prevent other errors from downloading response bodies too. Agree? -j _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
