summaryrefslogtreecommitdiff
path: root/src/HttpRequest.cc
Commit message (Collapse)AuthorAgeFilesLines
* 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
* 2010-07-16 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-07-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added --conditional-get option. Download file only when the local file is older than remote file. This function only works with HTTP(S) downloads only. It does not work if file size is specified in Metalink. It also ignores Content-Disposition header. If a control file exists, this option will be ignored. This function uses If-Modified-Since header to get only newer file conditionally. When getting modification time of local file, it uses user supplied filename(see --out option) or filename part in URI if --out is not specified. * doc/aria2c.1.txt * src/HttpHeader.cc * src/HttpHeader.h * src/HttpRequest.cc * src/HttpRequest.h * src/HttpRequestCommand.cc * src/HttpResponse.cc * src/HttpResponseCommand.cc * src/OptionHandlerFactory.cc * src/TimeA2.cc * src/TimeA2.h * src/prefs.cc * src/prefs.h * src/usage_text.h * test/HttpResponseTest.cc * test/TimeTest.cc
* 2010-07-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-07-121-1/+5
| | | | | | | | | | | | | | | | | | | Set end byte in Range header if start byte > 0 to get more chance to pool socket. * src/DefaultPieceStorage.cc * src/DefaultPieceStorage.h * src/DownloadCommand.cc * src/HttpDownloadCommand.cc * src/HttpRequest.cc * src/HttpRequest.h * src/HttpRequestCommand.cc * src/PieceStorage.h * src/UnknownLengthPieceStorage.h * test/DefaultPieceStorageTest.cc * test/HttpRequestTest.cc * test/MockPieceStorage.h
* 2010-06-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-211-59/+59
| | | | | | | Changed naming standards for class member variable: now it looks like var_ instead of _var.
* 2010-06-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-121-20/+21
| | | | | | | | Renamed member variables. * src/HttpRequest.cc * src/HttpRequest.h
* 2010-04-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-04-021-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Don't send "Accept: default, gzip" by default. This is because some server responds with "Content-Encoding: gzip" for files which itself is gzipped file and aria2 inflates them. This is a problem if user don't want to inflate the file. Apparently this is server configuration error, but I cannot do anything about this. So turn this off. Added --http-accept-gzip option. If true is given to this option, aria2 sends 'Accept: deflate, gzip' request header and inflates response if remote server responds with 'Content-Encoding: gzip' or 'Content-Encoding: deflate'. This indicates we removed extension tgz hack in order not to inflate files with tgz extensions. * doc/aria2c.1.txt * src/HttpRequest.cc * src/HttpRequest.h * src/HttpRequestCommand.cc * src/HttpResponseCommand.cc * src/OptionHandlerFactory.cc * src/prefs.cc * src/prefs.h * src/usage_text.h * test/HttpRequestTest.cc
* 2010-03-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | urlencode -> percentEncode, torrentUrlencode -> torrentPercentEncode * src/BtHandshakeMessage.cc * src/BtHandshakeMessageValidator.h * src/DHTMessageFactoryImpl.cc * src/DefaultBtAnnounce.cc * src/HandshakeExtensionMessage.cc * src/HttpRequest.cc * src/XmlRpcMethodImpl.cc * src/bittorrent_helper.cc * src/util.cc * src/util.h * test/DHTAnnouncePeerMessageTest.cc * test/DHTGetPeersMessageTest.cc * test/DHTGetPeersReplyMessageTest.cc * test/UTPexExtensionMessageTest.cc * test/UtilTest.cc
* 2010-03-01 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-02-281-5/+5
| | | | | | | | Avoid to calculate end() iterator in each loop. std::deque is particularly slow. Make sure that recalculate end iterator if element is erased during loop.
* 2010-02-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-02-281-3/+3
| | | | | | | Use vector instead of deque for containers which is used for mostly read-only purpose.