Bug#488557: NetRW and cgi-parameters

James Vega jamessan at debian.org
Tue Jul 1 17:46:27 UTC 2008


On Tue, Jul 01, 2008 at 12:55:16PM -0400, Charles Campbell wrote:
> James Vega wrote:
>> Chip,
>>
>> Current netrw doesn't properly download a file when there are cgi
>> parameters as part of the URL.  Given the following command, Vim starts
>> with an empty buffer
>>
>> vim 'http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=10;filename=nmu.diff;att=1;bug=484881'
>>
>> This also occurs if "&" is used instead of ";" for the parameter
>> separators.
>>
>>   
> James,
>
> The command that netrw executes is:  (all one line)
>
>   curl -o '/tmp/v948387/2.diff\;att=1\;bug=484881'  
> 'http://bugs.debian.org/cgi-bin/bugreport.cgi\?msg=10\;filename=nmu.diff\;att=1\;bug=484881'
>
> The backslashes and quotes are put in there by the shellescape()  
> function.  I note that the command
>
>   curl -o prblm 'http://...'    (ie. with no backslashes)
>
> works.  I think this may be a problem for Bram to consider.

I think there may be extra quoting happening in NetRW as

  :echo shellescape("http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=10;filename=nmu.diff;att=1;bug=484881")

and

  :exe "!ls " . shellescape("msg=10;filename=nmu.diff;att=1;bug=484881")

result in simple single quoting and no escaping of the ; or ?.

-- 
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <jamessan at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20080701/4d16334f/attachment.pgp 


More information about the pkg-vim-maintainers mailing list