From 31b4984aafed33a0835cdffc99e3309ad04e0bb4 Mon Sep 17 00:00:00 2001 From: wessels <> Date: Sat, 14 Feb 1998 00:47:38 +0000 Subject: [PATCH] From: Henrik Nordstrom This patch changes the content-type for type specified ftp transfers to type=i -> application/octet-stream type=a -> text/plain --- src/ftp.cc | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/ftp.cc b/src/ftp.cc index 73c34eae2e..6f9569b3fe 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -1,6 +1,6 @@ /* - * $Id: ftp.cc,v 1.192 1998/02/10 18:39:36 wessels Exp $ + * $Id: ftp.cc,v 1.193 1998/02/13 17:47:38 wessels Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived @@ -1802,8 +1802,19 @@ ftpAppendSuccessHeader(FtpStateData * ftpState) if (EBIT_TEST(ftpState->flags, FTP_ISDIR)) { mime_type = "text/html"; } else { - mime_type = mimeGetContentType(filename); - mime_enc = mimeGetContentEncoding(filename); + switch (ftpState->typecode) { + case 'I': + mime_type = "application/octet-stream"; + mime_enc = mimeGetContentEncoding(filename); + break; + case 'A': + mime_type = "text/plain"; + break; + default: + mime_type = mimeGetContentType(filename); + mime_enc = mimeGetContentEncoding(filename); + break; + } } storeBuffer(e); storeAppendPrintf(e, "HTTP/1.0 200 Gatewaying\r\n"); -- 2.47.2