summaryrefslogtreecommitdiff
path: root/src/FeatureConfig.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-07-22 16:05:02 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-07-22 16:05:02 +0000
commit3e4b74841280946ae024f5fbc48bdabacc250325 (patch)
treea1c75a2bfb3d2a6fcf429910c033a1a7fd9d1aa7 /src/FeatureConfig.cc
parentec395b6a9cf6bb233c07c6a3584f1dbe93f2d647 (diff)
2008-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added GZip to `Enabled Features' list. * src/FeatureConfig.cc * src/FeatureConfig.h * test/FeatureConfigTest.cc
Diffstat (limited to 'src/FeatureConfig.cc')
-rw-r--r--src/FeatureConfig.cc30
1 files changed, 19 insertions, 11 deletions
diff --git a/src/FeatureConfig.cc b/src/FeatureConfig.cc
index 06b37c09..62320178 100644
--- a/src/FeatureConfig.cc
+++ b/src/FeatureConfig.cc
@@ -47,36 +47,43 @@ const std::string FeatureConfig::FEATURE_BITTORRENT("BitTorrent");
const std::string FeatureConfig::FEATURE_METALINK("Metalink");
const std::string FeatureConfig::FEATURE_MESSAGE_DIGEST("Message Digest");
const std::string FeatureConfig::FEATURE_ASYNC_DNS("Async DNS");
+const std::string FeatureConfig::FEATURE_GZIP("GZip");
#ifdef ENABLE_SSL
# define HTTPS_ENABLED true
-#else
+#else // !ENABLE_SSL
# define HTTPS_ENABLED false
-#endif // ENABLE_SSL
+#endif // !ENABLE_SSL
#ifdef ENABLE_BITTORRENT
# define BITTORRENT_ENABLED true
-#else
+#else // !ENABLE_BITTORRENT
# define BITTORRENT_ENABLED false
-#endif // ENABLE_BITTORRENT
+#endif // !ENABLE_BITTORRENT
#ifdef ENABLE_METALINK
# define METALINK_ENABLED true
-#else
+#else // !ENABLE_METALINK
# define METALINK_ENABLED false
-#endif // ENABLE_METALINK
+#endif // !ENABLE_METALINK
#ifdef ENABLE_MESSAGE_DIGEST
# define MESSAGE_DIGEST_ENABLED true
-#else
+#else // !ENABLE_MESSAGE_DIGEST
# define MESSAGE_DIGEST_ENABLED false
-#endif // ENABLE_MESSAGE_DIGEST
+#endif // !ENABLE_MESSAGE_DIGEST
#ifdef ENABLE_ASYNC_DNS
# define ASYNC_DNS_ENABLED true
-#else
+#else // !ENABLE_ASYNC_DNS
# define ASYNC_DNS_ENABLED false
-#endif // ENABLE_ASYNC_DNS
+#endif // !ENABLE_ASYNC_DNS
+
+#ifdef HAVE_LIBZ
+# define GZIP_ENABLED true
+#else // !HAVE_LIBZ
+# define GZIP_ENABLED false
+#endif // !HAVE_LIBZ
FeatureConfig::FeatureConfig() {
_defaultPorts.insert(PortMap::value_type(Request::PROTO_HTTP, 80));
@@ -88,7 +95,8 @@ FeatureConfig::FeatureConfig() {
FeatureMap::value_type(FEATURE_BITTORRENT, BITTORRENT_ENABLED),
FeatureMap::value_type(FEATURE_METALINK, METALINK_ENABLED),
FeatureMap::value_type(FEATURE_MESSAGE_DIGEST, MESSAGE_DIGEST_ENABLED),
- FeatureMap::value_type(FEATURE_ASYNC_DNS, ASYNC_DNS_ENABLED)
+ FeatureMap::value_type(FEATURE_ASYNC_DNS, ASYNC_DNS_ENABLED),
+ FeatureMap::value_type(FEATURE_GZIP, GZIP_ENABLED),
};
_features.insert(&featureArray[0], &featureArray[arrayLength(featureArray)]);