#include "squid.h"
#include "base/RegexPattern.h"
#include "debug/Messages.h"
#include "fde.h"
#include "fs_io.h"
#include "globals.h"
#include "HttpHdrCc.h"
#include "HttpReply.h"
#include "HttpRequest.h"
#include "internal.h"
#include "MemBuf.h"
#include "MemObject.h"
#include "mime.h"
#include "SquidConfig.h"
#include "Store.h"
#include "StoreClient.h"
#include <array>
Go to the source code of this file.
Classes | |
class | MimeIcon |
class | MimeEntry |
Functions | |
static void | mimeFreeMemory (void) |
static const SBuf | mimeGetIcon (const char *fn) |
static MimeEntry * | mimeGetEntry (const char *fn, int skip_encodings) |
const char * | mimeGetIconURL (const char *fn) |
const char * | mimeGetContentType (const char *fn) |
const char * | mimeGetContentEncoding (const char *fn) |
char | mimeGetTransferMode (const char *fn) |
bool | mimeGetDownloadOption (const char *fn) |
bool | mimeGetViewOption (const char *fn) |
void | mimeInit (char *filename) |
Variables | |
static MimeEntry * | MimeTable = nullptr |
static MimeEntry ** | MimeTableTail = &MimeTable |
Function Documentation
◆ mimeFreeMemory()
|
static |
Definition at line 343 of file mime.cc.
References MimeTable, MimeTableTail, and MimeEntry::next.
Referenced by mimeInit().
◆ mimeGetContentEncoding()
const char * mimeGetContentEncoding | ( | const char * | fn | ) |
Definition at line 195 of file mime.cc.
References MimeEntry::content_encoding, dash_str, and mimeGetEntry().
Referenced by Ftp::Gateway::appendSuccessHeader().
◆ mimeGetContentType()
const char * mimeGetContentType | ( | const char * | fn | ) |
Definition at line 181 of file mime.cc.
References MimeEntry::content_type, dash_str, and mimeGetEntry().
Referenced by Ftp::Gateway::appendSuccessHeader(), and MimeIcon::load().
◆ mimeGetDownloadOption()
bool mimeGetDownloadOption | ( | const char * | fn | ) |
Definition at line 216 of file mime.cc.
References MimeEntry::download_option, and mimeGetEntry().
Referenced by Ftp::Gateway::htmlifyListEntry().
◆ mimeGetEntry()
Definition at line 88 of file mime.cc.
References MimeEntry::content_encoding, MimeEntry::content_type, dash_str, RegexPattern::match(), MimeTable, MimeEntry::next, MimeEntry::pattern, xfree, and xstrdup.
Referenced by mimeGetContentEncoding(), mimeGetContentType(), mimeGetDownloadOption(), mimeGetIcon(), mimeGetTransferMode(), and mimeGetViewOption().
◆ mimeGetIcon()
|
static |
Definition at line 151 of file mime.cc.
References SBuf::cmp(), dash_str, MimeIcon::getName(), mimeGetEntry(), and MimeEntry::theIcon.
Referenced by mimeGetIconURL().
◆ mimeGetIconURL()
const char * mimeGetIconURL | ( | const char * | fn | ) |
Definition at line 162 of file mime.cc.
References SBuf::append(), SBuf::c_str(), SBuf::clear(), Config, SquidConfig::icons, internalLocalUri(), SBuf::isEmpty(), mimeGetIcon(), null_string, and SquidConfig::use_short_names.
Referenced by Ftp::Gateway::htmlifyListEntry().
◆ mimeGetTransferMode()
char mimeGetTransferMode | ( | const char * | fn | ) |
Definition at line 209 of file mime.cc.
References mimeGetEntry(), and MimeEntry::transfer_mode.
Referenced by ftpSendType().
◆ mimeGetViewOption()
bool mimeGetViewOption | ( | const char * | fn | ) |
Definition at line 223 of file mime.cc.
References mimeGetEntry(), and MimeEntry::view_option.
Referenced by Ftp::Gateway::htmlifyListEntry().
◆ mimeInit()
void mimeInit | ( | char * | filename | ) |
Definition at line 235 of file mime.cc.
References BUFSIZ, CurrentException(), DBG_IMPORTANT, debugs, Important, MimeIcon::load(), mimeFreeMemory(), MimeTable, MimeTableTail, MimeEntry::next, O_TEXT, MimeEntry::theIcon, w_space, xstrerr(), and xstrncpy().
Referenced by mainInitialize(), and mainReconfigureFinish().
Variable Documentation
◆ MimeTable
|
static |
Definition at line 84 of file mime.cc.
Referenced by mimeFreeMemory(), mimeGetEntry(), and mimeInit().
◆ MimeTableTail
Definition at line 85 of file mime.cc.
Referenced by mimeFreeMemory(), and mimeInit().