mirror of
https://github.com/aria2/aria2.git
synced 2025-02-12 18:07:16 +00:00
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
This commit is contained in:
parent
ec395b6a9c
commit
3e4b748412
@ -1,3 +1,10 @@
|
||||
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
|
||||
|
||||
2008-07-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Now SegmentMan::findSlowerSegmentEntry() picks up the segment for which
|
||||
|
@ -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)]);
|
||||
|
@ -67,6 +67,7 @@ public:
|
||||
static const std::string FEATURE_METALINK;
|
||||
static const std::string FEATURE_MESSAGE_DIGEST;
|
||||
static const std::string FEATURE_ASYNC_DNS;
|
||||
static const std::string FEATURE_GZIP;
|
||||
};
|
||||
|
||||
} // namespace aria2
|
||||
|
@ -58,6 +58,10 @@ void FeatureConfigTest::testFeatureSummary() {
|
||||
"BitTorrent",
|
||||
#endif // ENABLE_BITTORRENT
|
||||
|
||||
#ifdef HAVE_LIBZ
|
||||
"GZip",
|
||||
#endif // HAVE_LIBZ
|
||||
|
||||
#ifdef ENABLE_SSL
|
||||
"HTTPS",
|
||||
#endif // ENABLE_SSL
|
||||
|
Loading…
x
Reference in New Issue
Block a user