cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Failed Writing Body

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 22 Sep 2011 13:52:59 +0200 (CEST)

On Wed, 21 Sep 2011, Mark Schienbein wrote:

> I added those options and the transfer now works from my program.

Ok, so now it is time for my rant.

Any person reading your comment here won't know what "those options" refer to.
They will need to chase down this mail to scan the bottom of it to try to
figure out what you're talking about, and most likely they will fail (due to
me editing out all irrelevant quotes before I send my mail) leaving a portion
of the audience clueless about what you're talking about.

This is one of the reasons why we always and repeatedly ask people NOT
TOP-POST on this and other curl related mailing lists.

This is mentioned in the mail etiquette web page to which there's a link
embedded in every post sent out on this mailing list. See the footer of this
mail and you'll find it.

Sometimes I don't remind people of this, trusting that perhaps if I just show
good example and as it comes up in other threads from time to time, people
will understand and adjust.

Explicitly not following the manners we ask of posters while still asking us
for help is a combination that I consider rude.

> I am using the CURLOPT_PROXY_TRANSFER_MODE setting to insure a binary file
> transfer through the proxy. As documented, this adds the "type=i" to the end
> of the URL. Unfortunately, the "type=i" gets set as part of the file name on
> the FTP server, however it does insure that the complete file is transfered.

The sad reality is that FTP over a HTTP proxy like you're doing is not
standardized anywhere and works more or less only chance and circumstance.
What works and what doesn't work is impossible to forsee and it will differ
from proxy to proxy.

Your problem doesn't make sense to me though, but perhaps I've misunderstood
it.

If you need type=i to get sent in the URL for the proxy to ask for the file in
binary from the remote FTP server as otherwise you get the file wrongly.

   but...

If you set type=i in the URL, then the proxy will send that as part of the
file name it requests from the server?

Did I misunderstand something?

> Without this setting, all CRLF in the input file are simply represented by a
> LF character in the output file.

FTP servers often defaults to type=a, ASCII, which probably makes the proxy
convert the data for you.

Exactly what is done probably depends entirely what your proxy consider to be
the right way. We can't possibly tell.

> Is their someway to tell CURL to do a binary transmission through the proxy,
> but not to apped the "type=i" clause to the URL?

If you want this data converted, why can't you just do it yourself in the
application? You're asking for magic data conversion beyond what the procotols
say, do and offer, so you're basically already out on very thin ice and very
proxy specific code.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-09-22