This is a multi-part message in MIME format.
--------------6E428775761A98824BD05163
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
This patch changes the content-type for type specified ftp transfers to
type=i -> application/octet-stream
type=a -> text/plain
/Henrik
--------------6E428775761A98824BD05163
Content-Type: text/plain; charset=us-ascii; name="squid-1.2.beta14.ftp_content_type.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="squid-1.2.beta14.ftp_content_type.patch"
Index: squid/src/ftp.c
diff -u squid/src/ftp.c:1.1.1.10 squid/src/ftp.c:1.1.1.10.2.1
--- squid/src/ftp.c:1.1.1.10 Thu Feb 5 22:45:02 1998
+++ squid/src/ftp.c Sun Feb 8 02:37:42 1998
@@ -1803,8 +1803,19 @@
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");
--------------6E428775761A98824BD05163--
Received on Tue Jul 29 2003 - 13:15:46 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:11:42 MST