Thanks to Rob Mensching answering this on the wix-users mailing list:
Make sure your packages of URLs provided (authored is easiest but you can programmatically set them all) then return IDDOWNLOAD from the ResolveSource call.
I edited my code as follows:
private void OnResolveSource(object sender, ResolveSourceEventArgs e)
{
if (!File.Exists(e.LocalSource) && !string.IsNullOrEmpty(e.DownloadSource))
e.Result = Result.Download;
}
Setting the result to Result.Download
instructs the bootstrapper engine to download the package. No need to try to download the file myself.