Re: [squid-users] Replace LF with CR/LF while transfer from ftp through squid

From: Eliezer Croitoru <eliezer_at_ngtech.co.il>
Date: Tue, 06 Aug 2013 16:18:21 +0300

On 08/06/2013 03:34 PM, Alexey Roslyakov wrote:
> 06.08.2013 17:21, Eliezer Croitoru пишет:
>> It's not squid 100%. I have downloaded a file using chrome and it
>> seems like geany shows it fine. If you have issues with that you
>> should try to use another OS and then inspect the file to make sure
>> the OS or the browser does soemthing to the file. Regards, Eliezer
> Thank you for you reply.
> Hmm, dunno what I'm doing wrong. I'm try it on:
> Internet <-> FreeBSD + squid (2.7,3.1,3.2) <-> FreeBSD: fetch
> ftp://url_to_file
> Internet <-> FreeBSD + squid3.2 <-> Win7: IE/FireFox
> Internet <-> Debian 7 + squid3 <-> Debian 7: wget ftp://url_to_file
> Internet <-> Debian 7 + squid3 <-> Debian 7: Iceweasel
> and none of this combination was helpful (only direct download).
>
> ps: I'm trying d/l this two files: malloc-2.8.4.c (original size:
> 199774), malloc-2.8.4.h (originnal size: 20320)from link in previous
> message.
>
>
This is how it's being done using wget:
------
tmp]$ wget "ftp://gee.cs.oswego.edu/pub/misc/malloc-2.8.4.h"
--2013-08-06 16:09:41-- ftp://gee.cs.oswego.edu/pub/misc/malloc-2.8.4.h
           => ‘malloc-2.8.4.h.1’
Resolving gee.cs.oswego.edu (gee.cs.oswego.edu)... 129.3.20.1
Connecting to gee.cs.oswego.edu (gee.cs.oswego.edu)|129.3.20.1|:21...
connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /pub/misc ... done.
==> SIZE malloc-2.8.4.h ... 20320
==> PASV ... done. ==> RETR malloc-2.8.4.h ... done.
Length: 20320 (20K) (unauthoritative)

100%[===============================================================================================================================================>]
20,320 45.8KB/s in 0.4s

2013-08-06 16:09:50 (45.8 KB/s) - ‘malloc-2.8.4.h.1’ saved [20320]

this file is being maybe changed by one of the blinds in the way...

This is a basic diff that shows what you are saying:
 cat -A malloc-2.8.4.c|head
/*$
  This is a version (aka dlmalloc) of malloc/free/realloc written by$
  Doug Lea and released to the public domain, as explained at$
  http://creativecommons.org/licenses/publicdomain. Send questions,$
  comments, complaints, performance data, etc to dl_at_cs.oswego.edu$
$
* Version 2.8.4 Wed May 27 09:56:23 2009 Doug Lea (dl at gee)$
$
   Note: There may be an updated version of this malloc obtainable at$
           ftp://gee.cs.oswego.edu/pub/misc/malloc.c$
[eliezer_at_EC7 tmp]$ cat -A malloc-2.8.4.c.1|head
/*^M$
  This is a version (aka dlmalloc) of malloc/free/realloc written by^M$
  Doug Lea and released to the public domain, as explained at^M$
  http://creativecommons.org/licenses/publicdomain. Send questions,^M$
  comments, complaints, performance data, etc to dl_at_cs.oswego.edu^M$
^M$
* Version 2.8.4 Wed May 27 09:56:23 2009 Doug Lea (dl at gee)^M$
^M$
   Note: There may be an updated version of this malloc obtainable at^M$
           ftp://gee.cs.oswego.edu/pub/misc/malloc.c^M$

----
And it only states that there is a transformation either by wget or
other application since for me using squid+geany there is no difference..
Now trying ftp using a proxy like squid 3.4.0.1:
...
ftp> get malloc-2.8.4.c
local: malloc-2.8.4.c remote: malloc-2.8.4.c
227 Entering Passive Mode (129,3,20,1,122,12)
150 Opening BINARY mode data connection for malloc-2.8.4.c (199774 bytes).
226 Transfer complete.
199774 bytes received in 2 secs (99.93 Kbytes/sec)
ftp> quit
221-You have transferred 199774 bytes in 1 files.
221-Total traffic for this session was 204403 bytes in 4 transfers.
221-Thank you for using the FTP service on gee.
221 Goodbye.
#ls -la malloc-2.8.4.c
-rw-rw-r--. 1 eliezer eliezer 199774 Aug  6 16:16 malloc-2.8.4.c
so which is it? wget or ftp?
Eliezer
Received on Tue Aug 06 2013 - 13:18:58 MDT

This archive was generated by hypermail 2.2.0 : Tue Aug 06 2013 - 12:00:15 MDT