From: sc on
is there a way to tell lynx or somebody to execute something like

http://www.vim.org/scripts/download_script.php?src_id=12904

so that bufexplorer.zip winds up somewhere i can find it?

wget doesn't understand what to do with php, or something

any help will be appreciated
From: Tim Harig on
On 2010-08-12, sc <nospam(a)spamhaters.com> wrote:
> is there a way to tell lynx or somebody to execute something like
>
> http://www.vim.org/scripts/download_script.php?src_id=12904
>
> so that bufexplorer.zip winds up somewhere i can find it?
>
> wget doesn't understand what to do with php, or something
>
> any help will be appreciated

wget -O bufexplorer.zip \
'http://www.vim.org/scripts/download_script.php?src_id=12904'
From: Ben Finney on
Tim Harig <usernet(a)ilthio.net> writes:

> On 2010-08-12, sc <nospam(a)spamhaters.com> wrote:
> > http://www.vim.org/scripts/download_script.php?src_id=12904
> >
> > so that bufexplorer.zip winds up somewhere i can find it?
> >
> > wget doesn't understand what to do with php, or something
>
> wget -O bufexplorer.zip \
> 'http://www.vim.org/scripts/download_script.php?src_id=12904'

The trouble is, the person in possession of the URL
“http://www.vim.org/scripts/download_script.php?src_id=12904” has no
idea in advance what filename will be suggested by the web server.

Yet the client clearly is capable of getting that information from the
response sent by the server, since interactive browsers save to the
correct filename. I think the OP is asking how to tell 'wget' to do the
same: to get the suggested filename from wherever it lives in the HTTP
response.

--
\ “This world in arms is not spending money alone. It is spending |
`\ the sweat of its laborers, the genius of its scientists, the |
_o__) hopes of its children.” —Dwight Eisenhower, 1953-04-16 |
Ben Finney
From: Tim Harig on
On 2010-08-12, Ben Finney <ben+unix(a)benfinney.id.au> wrote:
> Tim Harig <usernet(a)ilthio.net> writes:
>
>> On 2010-08-12, sc <nospam(a)spamhaters.com> wrote:
>> > http://www.vim.org/scripts/download_script.php?src_id=12904
>> >
>> > so that bufexplorer.zip winds up somewhere i can find it?
>> >
>> > wget doesn't understand what to do with php, or something
>>
>> wget -O bufexplorer.zip \
>> 'http://www.vim.org/scripts/download_script.php?src_id=12904'
>
> The trouble is, the person in possession of the URL
> ???http://www.vim.org/scripts/download_script.php?src_id=12904??? has no
> idea in advance what filename will be suggested by the web server.
>
> Yet the client clearly is capable of getting that information from the
> response sent by the server, since interactive browsers save to the
> correct filename. I think the OP is asking how to tell ???wget??? to do the
> same: to get the suggested filename from wherever it lives in the HTTP
> response.

From the wget man page:

wget --content-disposition

If this is set to on, experimental (not
fully-functional) support for "Content-Disposition"
headers is enabled. This can currently result in extra
round- trips to the server for a "HEAD" request, and
is known to suffer from a few bugs, which is why it
is not currently enabled by default.

This option is useful for some file-downloading CGI
programs that use "Content-Disposition" headers to
describe what the name of a downloaded file should be.
From: sc on
Tim Harig wrote:

> From the wget man page:
>
> wget --content-disposition
>
> If this is set to on, experimental (not
> fully-functional) support for "Content-Disposition"
> headers is enabled. This can currently result in extra
> round- trips to the server for a "HEAD" request, and
> is known to suffer from a few bugs, which is why it
> is not currently enabled by default.

it may have bugs, but for me and the vim.org php, it works
famously

thanx guys

sc
 | 
Pages: 1
Prev: vi key bindings
Next: ERR trap