Bug#488557: NetRW and cgi-parameters
Bram Moolenaar
Bram at moolenaar.net
Tue Jul 1 19:34:51 UTC 2008
Charles -
> 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.
Nope. I ran this in the debugger and the backslashes are already there
in the argument to shellescape(). shellescape() only adds the quotes.
There is a call to escape() in GetTempfile(), perhaps that's where this
happens, at least for the temp file?
- Bram
--
Why is it called "Windows"? "Gates" would be more appropriate...
/// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
More information about the pkg-vim-maintainers
mailing list