Last modified: 2009-07-27 21:33:23 UTC
Created attachment 6386 [details] Patch against r53755 to fix the bugs UploadFromUrl::initialize never sets dl_mode if asynchronous mode is false. And then Http::doDownload doesn't bother to verify that it got any expected value for dl_mode (or, for that matter, whether ASYNC_DOWNLOAD was requested when it's not available). Which results in a null being returned (by falling off the end of the function) rather than the expected error object. I've attached a patch that fixes both of these: it makes UploadFromUrl's dl_mode be set to SYNC_DOWNLOAD unless specifically set otherwise and makes Http::doDownload try synchronous download unless async is requested and available (instead of only when specifically requested). An alternate possibility for the latter would be to return a Status::newFatal at the end of the function, if you'd rather error out than try the sync download anyway.
Michael, can you take a quick peek & confirm/apply this patch? Thanks!
patch applied ( r53825 ) makes sense to cover all the possibilities.