summaryrefslogtreecommitdiff
path: root/src/HttpRequest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Use default where possibleNils Maier2016-08-291-1/+1
|
* Refactor HttpRequestTatsuhiro Tsujikawa2016-01-101-85/+82
| | | | | This also makes comparison performed when replacing builtin header field with user-defined one case-insensitive.
* Send Want-Digest as per RFC 3230Tatsuhiro Tsujikawa2016-01-101-1/+21
|
* make clang-format using clang-format-3.6Tatsuhiro Tsujikawa2015-12-271-127/+95
|
* Rewrite Time with chronoTatsuhiro Tsujikawa2015-06-091-1/+1
|
* Stuff memory holesNils Maier2013-12-091-6/+6
| | | | | | | | | | | | | | | | | | Padding changes on x86_64: - RequestGroup: 29 -> 5 bytes - DownloadContext: 25 -> 1 bytes - Cookie: 20 -> 4 bytes - Command: 8 -> 0 bytes (affects many derived as well) - HttpRequest: 20 -> 4 bytes - DownloadCommand: 18 -> 2 bytes - TimeBasedCommand: 14 -> 6 bytes - AbstractCommand: 13 -> 5 bytes - HttpSkipResponseCommand: 12 -> 4 bytes - FileEntry: 10 -> 2 bytes - DownloadResult: 15 -> 7 bytes - UriStruct: 12 -> 4 bytes - Piece: 11 -> 3 bytes - BitfieldMan -> 11 -> 3 bytes
* Request: Remove previousUri_Tatsuhiro Tsujikawa2013-10-011-7/+2
| | | | | | Historically, the previousUri_ has different meaning from referer_, but in the course of development, they have the same value. This change remove previousUri_ in favor of referer_.
* More auto-converts by cpp11-migrateNils Maier2013-09-201-4/+3
|
* Convert to autos and ranged loopsNils Maier2013-08-211-15/+12
|
* Convert most 0/NULL pointers to nullptrNils Maier2013-08-201-3/+3
| | | | Courtesy of llvm cpp11-migrate 3.3
* Rewrite CookieStorageTatsuhiro Tsujikawa2013-06-291-7/+5
|
* Refactor HttpConnection and its neighbor objectsTatsuhiro Tsujikawa2013-06-261-1/+1
|
* HttpRequest: Use raw non-owning pointer for cookieStorage_Tatsuhiro Tsujikawa2013-06-251-2/+7
|
* HttpRequest: Store non-owning raw pointer for authConfigFactory_Tatsuhiro Tsujikawa2013-06-251-9/+14
|
* Require -std=c++11 and use std::shared_ptr instead of SharedHandleTatsuhiro Tsujikawa2013-06-221-9/+9
|
* Code cleanupTatsuhiro Tsujikawa2013-03-181-4/+4
|
* Fix bug that invalid range error when requesting range starting 0Tatsuhiro Tsujikawa2013-03-181-1/+2
| | | | | | | | | Since the change b782a56b, we use endOffsetOverride_ as the return value of getEndByte(). But aria2 does not send Range header field when range starts 0 (this is because some server returns error if it received Range: 0-), and the HttpRequest::isRangeSatisfied() checks the equality of getEndByte() and the end byte in response header and fails. The fix is send Range header if getEndByte() is set.
* Show correct end byte in error message when HTTP response range is not okTatsuhiro Tsujikawa2013-02-231-2/+4
| | | | | | Previously, unless HTTP pipelining is enabled, end byte in that message is always 0. With this change, it shows correct end byte sent to the HTTP server.
* Initialized scalar membersTatsuhiro Tsujikawa2012-10-291-0/+1
|
* Removed trailing spacesTatsuhiro Tsujikawa2012-10-011-3/+3
|
* Dont' return SharedHandle from HttpHeader::getRange()Tatsuhiro Tsujikawa2012-09-301-9/+8
|
* Removed *Handle typedefTatsuhiro Tsujikawa2012-09-281-2/+2
|
* Removed Request::PROTO_*Tatsuhiro Tsujikawa2012-09-251-3/+3
|
* Don't send Proxy-Connection header fieldTatsuhiro Tsujikawa2012-09-231-10/+1
| | | | It was deprecated long ago.
* Rewritten DownloadHandlerConstantsTatsuhiro Tsujikawa2012-09-221-9/+9
| | | | | | | | | | DownloadHandlerConstants was simplified. MIME type handling in Accept header was also reworked. DownloadContext's metalinkServerContacted_ is replaced with acceptMetalink_ and its boolean value is reverted. RequestGroup and HttpRequest now do not hold vector of accepting types. HttpRequest has the flag acceptMetalink_ which will be set by the same value of DownloadContext::accpetMetalink_ and if it is true, Metalink MIME types are added to Accept header field.
* Removed static_cast<int64>()s where they are unnecessaryTatsuhiro Tsujikawa2012-06-251-2/+1
|
* Use int64_t instead of off_tTatsuhiro Tsujikawa2012-06-251-5/+5
| | | | | Some classes such as DiskAdaptor, DiskWriter, FileAllocationIterator and ChecksumValidator are left unchanged.
* Use PRId64 for int64_t format specifierTatsuhiro Tsujikawa2012-06-251-2/+2
|
* Code cleanup: use empty() to check size() == 0Tatsuhiro Tsujikawa2012-02-121-1/+1
|
* Use short form of util::startsWith and util::endsWithTatsuhiro Tsujikawa2012-01-111-2/+1
|
* Removed static const char[] as much as possible.Tatsuhiro Tsujikawa2012-01-111-6/+2
| | | | | Provided convenient functions for streq, strieq, startsWith, istartsWith, endsWith, iendsWith to support this move.
* Replaced uint64_t with off_t or int64_t.Tatsuhiro Tsujikawa2011-12-091-1/+1
| | | | | Since off_t is int64_t with LFS, we cannot take advantage of extra capacity of uint64_t.
* Use fmt instead of util::itosTatsuhiro Tsujikawa2011-11-131-3/+2
|
* Include trailing "/" in UriStruct::dir.Tatsuhiro Tsujikawa2011-11-121-12/+2
| | | | The duplicate "/"s in dir are not removed now.
* Don't append character to std::string.Tatsuhiro Tsujikawa2011-11-121-1/+1
|
* Removed strappendTatsuhiro Tsujikawa2011-11-121-15/+26
|
* Removed strconcatTatsuhiro Tsujikawa2011-11-121-7/+10
|
* Use util::strifind instead of std::toLower and std::string::find.Tatsuhiro Tsujikawa2011-11-121-3/+2
|
* Made const char[] staticTatsuhiro Tsujikawa2011-11-111-2/+2
|
* Rewritten base64::decode and base64::encodeTatsuhiro Tsujikawa2011-11-051-10/+10
|
* mv Base64.{cc,h} base64.{cc,h}Tatsuhiro Tsujikawa2011-11-051-1/+1
|
* Removed util::startsWith(a, b)Tatsuhiro Tsujikawa2011-11-041-3/+8
|
* Rewritten util::split and added its iterator version.Tatsuhiro Tsujikawa2011-11-041-3/+2
| | | | | Iterator based functions util::startsWith, util::endsWith, util::streq, util::strieq were added.
* Replaced HAVE_LIBZ with HAVE_ZLIBTatsuhiro Tsujikawa2011-02-181-2/+2
|
* Accept HTTP 304 reply as success when If-None-Match request-headerTatsuhiro Tsujikawa2011-01-291-0/+21
| | | | | | | field is specified using --header option. When --conditional-get is used, --allow-overwrite is now required to overwrite existing file.
* 2010-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-141-0/+74
| | | | | | | | | Added .cc file for classes/structs that only provided by header file. Defined non-POD classes' ctor, dtor in .cc file. Moved implementation code in header file to .cc file for major classes/strucsts.
* 2010-11-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-121-14/+14
| | | | | | | | Removed SharedHandle::isNull(). Instead we added operator* and operator unspecified_bool_type. Removed use of WeakHandle and replaced with raw pointer.
* 2010-10-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-10-311-1/+1
| | | | | | | | Fixed the bug that downloading > 4GB file fails on 32bit systems. * src/HttpRequest.cc * src/HttpRequestCommand.cc
* 2010-10-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-10-301-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use unnamed namespace instead of static keyword. * src/AbstractCommand.cc * src/AdaptiveURISelector.cc * src/Base64.cc * src/BitfieldMan.cc * src/BtDependency.cc * src/ConsoleStatCalc.cc * src/ContentTypeRequestGroupCriteria.cc * src/CookieStorage.cc * src/DHTMessageFactoryImpl.cc * src/DHTRoutingTableDeserializer.cc * src/DefaultBtAnnounce.cc * src/DefaultBtProgressInfoFile.cc * src/DefaultPeerStorage.cc * src/DefaultPieceStorage.cc * src/DownloadCommand.cc * src/DownloadEngine.cc * src/EpollEventPoll.cc * src/ExpatMetalinkProcessor.cc * src/ExpatXmlRpcRequestProcessor.cc * src/FileEntry.cc * src/HttpRequest.cc * src/HttpRequestCommand.cc * src/HttpResponseCommand.cc * src/KqueueEventPoll.cc * src/LongestSequencePieceSelector.cc * src/MetalinkParserStateV3Impl.cc * src/MetalinkParserStateV4Impl.cc * src/MultiDiskAdaptor.cc * src/MultiUrlRequestInfo.cc * src/OptionParser.cc * src/PeerSessionResource.cc * src/PortEventPoll.cc * src/Request.cc * src/RequestGroupMan.cc * src/SelectEventPoll.cc * src/SessionSerializer.cc * src/SimpleLogFormatter.cc * src/Sqlite3CookieParser.cc * src/TrackerWatcherCommand.cc * src/XML2SAXMetalinkProcessor.cc * src/Xml2XmlRpcRequestProcessor.cc * src/XmlRpcMethod.cc * src/XmlRpcMethodImpl.cc * src/XmlRpcResponse.cc * src/base32.cc * src/bencode2.cc * src/bittorrent_helper.cc * src/download_helper.cc * src/main.cc * src/messageDigest.cc * src/option_processing.cc * src/util.cc * test/AnnounceListTest.cc * test/BtRegistryTest.cc * test/DHTBucketTest.cc * test/DHTRoutingTableTest.cc * test/DefaultBtAnnounceTest.cc * test/FileEntryTest.cc * test/FtpConnectionTest.cc * test/MSEHandshakeTest.cc * test/MagnetTest.cc * test/XmlRpcMethodTest.cc * test/array_funTest.cc
* 2010-10-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-10-091-5/+7
| | | | | | | | | | | | | Don't append slash in CookieStorage::criteriaFind(). Append file part of URI to request-uri in HttpRequest::createRequest(). This change reverts the part of the previous change:"The request-path must be ends with '/' so that request-path '/foo/' path-matches cookie-path '/foo' and '/foo/' in the proposed algorithm." * src/CookieStorage.cc * src/HttpRequest.cc