cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: automatically appending ; type=<a|i> when using http proxies for ftp urls?

From: Michal Marek <mmarek_at_suse.cz>
Date: Thu, 13 Sep 2007 17:08:52 +0200

Jamie Lokier wrote:
> Daniel Stenberg wrote:
>>> when retrieving ftp://... urls directly, curl defaults to TYPE I, unless
>>> the url ends with ;type=a or CURLOPT_TRANSFERTEXT is set. However, when a
>>> http proxy is used, curl just passes the url to the proxy, without trying
>>> to enforce a transfer mode, leaving it up to the proxy / ftp server to
>>> decide.
>>>
>>> I've a (half-working :)) patch to automatically apped ;type=<a|i> in such
>>> cases if not already present, to make it consistent with the non-proxy
>>> case. Do you think curl should behave that way and I should finish the
>>> patch, or does the user need to take this difference into acount?
>> I think it sounds like a good idea, since when speaking FTP over a HTTP
>> proxy I think the proxy needs as much extra hints as possible to make an as
>> good transfer as possible!

[...working on it...]

> It might be worth checking what other programs do. If most
> FTP-over-HTTP proxies accept that URL syntax, great. But if they
> don't, that patch will stop curl working with them.

This syntax is documented by rfc1738 - Uniform Resource Locators (URL),
so I *hope* it's accepted, but you're right that we should probably be
carefull here. Squid supports it, I don't have any other proxy here to
test...

Michal
Received on 2007-09-13