[PEAK] Downloading via redirection

Yang qp10sxo02 at sneakemail.com
Sat Mar 24 00:06:01 EDT 2007

On 3/23/07, Phillip J. Eby pje-at-telecommunity.com |python-peak|
<...> wrote:
> At 08:46 PM 3/23/2007 -0500, Justizin wrote:
> >On 3/23/07, Phillip J. Eby <pje at telecommunity.com> wrote:
> >>However, it *doesn't* have aby way of knowing that 'index.php' is in fact
> >>'python-commons-0.1.tgz', when it sees it mentioned in a link on a web
> >>page.  If you want it to be able to know this, you need to add
> >
> >It should be noted that in this case, on the server side, the
> >Content-Disposition header may contain a filename, I forget the exact
> >incarnation but it is something like:
> >
> >Content-Disposition: attachment; python_commons-0.1.tgz
> >
> >This is how your web browser sometimes knows to turn
> >download.php?id=21lk21421 into a file on your desktop ish with a
> >proper filename.
> >
> >I don't know how easy_install would handle this, but I do believe it
> >would be the ideal / proper interaction.
> You're missing the point.  If easy_install doesn't know that's a link to a
> tarball, it won't download it in the first place.  If it *knows* it's a
> direct download link (e.g., you specify it on the command line), it works
> just fine already.
> Content-type and disposition are red herrings here -- easy_install will
> never see them because it doesn't download every link it sees on a web
> page, which could be links to images, web pages, or who knows what
> else.  As far as easy_install is concerned, a URL ending in 'index.php' is
> not something to download, unless explicitly told otherwise.

Hm. I believe both Justizin and I were thinking that easy_install
would at least try the Download-URL in the package's PKG-INFO. If
that's not what currently happens - I hope you consider implementing
this behavior.

More information about the PEAK mailing list