Re: SQUID 1.1.4 fixes

From: Don Lewis <Don.Lewis@dont-contact.us>
Date: Fri, 17 Jan 1997 21:00:14 -0800

On Jan 17, 10:38pm, Edward Henigin wrote:
} Subject: Re: SQUID 1.1.4 fixes
}
} Hrmm.. I didn't know this was an issue.. all the posts I've
} seen to this list regarding this issue have just been about the mime
} type to send back to the client. All I'm suggesting is a way to
} deal with the mime type to send back to the client.

Hmn, good point. Actually, the left hand doesn't know what the right
hand is doing.

The ftpTransferMode() function looks at the URL, and tries to extract
the extension. If it can't find and extension, or if mime_ext_type()
doesn't understand the extension, ftpTransferMode() defaults to a
binary transfer. Otherwise, ftpTransferMode picks an ASCII mode
transfer if the encoding is "7bit".

The mime_get_type() function also parses the URL with a somewhat different
algorithm. If there is no extension, or if it doesn't understand the
extension, then the MIME type is whatever DEFAULT_MIME_TYPE is set to.

These two functions really need to agree on the type, since "text/plain"
files should be transferred in ASCII mode and "application/octet-stream"
files should be transferred in binary.

In any case, you have to decide what the file type is before you start
the ftp transfer. If you start the transfer in the wrong mode, examine
at the file, and just change the MIME type, then you have a good chance
of transferring a corrupted file.

                        --- Truck
Received on Fri Jan 17 1997 - 21:07:10 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:34:07 MST