[Catalog-sig] setuptools upload to pypi

"Martin v. Löwis" martin at v.loewis.de
Mon Jul 23 23:03:20 CEST 2007


> because I turned of proxying from www.python.org/pypi
>> to cheeseshop.python.org/pypi, and replaced it with redirection
>> (302, temporary redirect) instead (temporary just in case people
>> find problems with that).
> 
> If you were doing that for POST requests, that is probably the source of
> the problem.  You could always restrict the proxying to occur only for
> non-GET requests, since IIRC distutils.command.register and
> distutils.command.upload use POSTs.  GET requests generally have a much
> wider leeway for safe redirection than POST requests do.

What is the problem with redirects for POST? In particular, why doesn't
urllib2 support it?

> Of course, one must also preserve the query string in a redirected GET,
> and I don't think Apache's Redirect directive does that either.  You can
> certainly do it with mod_rewrite, however.

I see - I was using a plain Redirect.

> I expect that the combination of preserving query strings on
> redirection, and only redirecting GETs should make the transition safe.

Can you share the magic to do that? I'd really like to start phasing
out www.python.org/pypi, although I now see that it will take a few
Python releases to get the cheeseshop home page replaced in distutils.

In particular, if I also keep the mod_proxy setup for the reverse
proxy, how will it interact with the redirect for the GET only?

Regards,
Martin


More information about the Catalog-SIG mailing list