[wp-hackers] Plugin zip problem on wordpress.org
Jeremy Visser
jeremy.visser at gmail.com
Wed Nov 14 18:26:10 GMT 2007
On 14/11/2007, at 10:09 AM, Callum Macdonald wrote:
> It would be more useful if it 302 redirected to the current
> release. Otherwise wget downloads a file called latest.tar.gz which
> is immediately out of date (you have to download it every time to
> know it's current).
It actually downloads as wordpress-2.3.1.tar.gz if you do it with
Firefox. That's because of the Content-Disposition header sent by the
web server. Have a look:
> rillian:~ jeremy$ telnet wordpress.org 80
> Trying 72.233.56.139...
> Connected to wordpress.org.
> Escape character is '^]'.
> HEAD /latest.tar.gz HTTP/1.1
> Host: wordpress.org
>
> HTTP/1.0 200 OK
> X-Powered-By: PHP/4.4.7
> Pragma: no-cache
> Cache-Control: private
> Content-Description: File Transfer
> Content-Type: application/x-gzip
> Content-Disposition: attachment; filename=wordpress-2.3.1.tar.gz
> Date: Wed, 14 Nov 2007 07:21:59 GMT
> Server: LiteSpeed
> Connection: close
In particular, this:
> Content-Disposition: attachment; filename=wordpress-2.3.1.tar.gz
This tells the browser what filename to save the file as, but
unfortunately wget doesn't support that header, for some reason. I
guess it makes it easier to predict the filename when running it from
a script; but I guess if you were scripting it, you'd use the -O
argument to force it to have a particular filename.
More information about the wp-hackers
mailing list