summaryrefslogtreecommitdiff
path: root/test/RequestTest.cc
Commit message (Collapse)AuthorAgeFilesLines
* 2009-08-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-08-301-0/+27
| | | | | | | | | | | | | | Added support for IPv6 literal address in URI. Now aria2 can handle URI such as http://[::1]/ * src/HttpRequest.cc * src/HttpRequest.h * src/Request.cc * src/Request.h * test/HttpRequestTest.cc * test/OptionHandlerTest.cc * test/RequestTest.cc
* 2008-12-16 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2008-12-151-0/+36
| | | | | | | | | | | | | | | Fixed the bug that causes corrupted downloads if HTTP pipelining is enabled and the server doesn't support keep-alive. * src/AbstractCommand.cc * src/DownloadCommand.cc * src/HttpDownloadCommand.cc * src/HttpDownloadCommand.h * src/HttpResponseCommand.cc * src/Request.cc * src/Request.h * test/RequestTest.cc
* 2008-11-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2008-11-271-2/+2
| | | | | | | | | | | | | | | | RFC3986 complied Percent-Encoding(urlencode). Use uppercase hexadecimal digits for encoded text instead of lowercase ones. * src/Request.cc * src/Util.cc * src/Util.h * test/BtHandshakeMessageTest.cc * test/DefaultBtAnnounceTest.cc * test/DefaultBtContextTest.cc * test/RequestTest.cc * test/UtilTest.cc
* 2008-11-19 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2008-11-181-2/+5
| | | | | | | | | | Do not urlencode Request::url in setUrl() because we want unmodified URL using Request::getUrl() * src/Request.cc * src/Request.h * test/RequestTest.cc
* 2008-10-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-10-081-3/+3
| | | | | | | | Fixed the bug that last character in URI is not encoded. * src/Request.cc * test/RequestTest.cc
* 2008-10-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-10-081-1/+20
| | | | | | | | | | | Fixed the bug that referer header field contains fragment. Now Request class removes fragment part of URI and encodes it in Request::setUri() and setReferer(). * src/Request.h * src/Request.cc * test/RequestTest.cc
* 2008-09-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-09-251-2/+1
| | | | | | | | | | | | | Reverted previous change. Insert username+'@' to URI(after ftp://) when URI is FTP scheme and username is not in URI. * src/HttpRequest.cc * src/Request.cc * test/HttpRequestTest.cc * test/RequestTest.cc
* 2008-09-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-09-251-1/+2
| | | | | | | | | | | | | | | | Now colon is required for username and password in FTP URL, like: ftp://username:password@host. If colon is not there, aria2 don't parse it as a username. For example, aria2 don't retrieve username from ftp://username@host. This fix was made in order to login FTP server via non-transparent ftp proxy. * src/Request.cc * test/RequestTest.cc
* 2008-07-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-07-181-2/+17
| | | | | | | | | | | | | | | | Supported absolute/relative path in Location header field. * src/AbstractCommand.cc: Call resetUrl() when DlRetryEx is caught. * src/HttpHeader.cc * src/HttpHeader.h * src/HttpResponse.cc * src/HttpSkipResponseCommand.cc * src/Request.cc * test/HttpHeaderTest.cc * test/HttpResponseTest.cc * test/RequestTest.cc
* 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-06-171-0/+2
| | | | | | | | | | | Cancel download if http redirect is bounded more than 20 times. * src/AbstractCommand.cc * src/HttpSkipResponseCommand.cc * src/Request.cc * src/Request.h * test/RequestTest.cc
* 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-05-081-3/+3
| | | | | | | | | | Set _supportsPersistentConnection to true by default. * src/Request.cc * src/RequestGroup.cc * test/HttpRequestTest.cc * test/RequestTest.cc
* 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-04-271-6/+22
| | | | | | | | | | | | | | | Removed query part from filename in HTTP download. The query part means the substring after "?" in URL. Firefox seems do the same thing. A query part is sometimes very long and not suitable to filename, so I think it is better to remove it from filename. * src/HttpRequest.cc * src/HttpRequest.h * src/Request.cc * src/Request.h * test/HttpRequestTest.cc * test/RequestTest.cc
* 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-04-221-3/+3
| | | | | | | | | | | | | | | | | | Rewritten HTTP keep-alive and pipelining routine. * src/AbstractCommand.cc * src/HttpConnection.cc * src/HttpDownloadCommand.cc * src/HttpRequest.cc * src/HttpRequestCommand.cc * src/HttpResponseCommand.cc * src/Request.cc * src/Request.h * src/RequestGroup.cc * test/HttpRequestTest.cc * test/HttpResponseTest.cc * test/RequestTest.cc
* 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-03-091-14/+14
| | | | | | type cleanup for allmost all remaining files.
* 2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-02-081-110/+114
| | | | | | | | | Removed "using namespace std;" from all sources. Appended std:: prefix to c++ standard classes. Included string.h where mem* function are used.
* 2007-12-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-12-081-6/+6
| | | | | | | | | | Fixed compilation warnings * test/DataTest.cc * test/HttpRequestTest.cc * test/MetaFileUtilTest.cc * test/RequestTest.cc
* 2007-11-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-11-111-29/+14
| | | | | | | | | | | | | | urlencode the given url inside Request::parseUrl(...) * src/Request.{h, cc} * src/Util.{h, cc} * test/RequestTest.cc Removed #!metalink3! notation support because it is deleted from the metalink specification. * src/Request.{h, cc} * test/RequestTest.cc
* 2007-10-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-10-301-70/+59
| | | | | | | | | | | | | | | | | | | | Added ftp://USER:PASSWD@Servername automatic parsing. * src/Request.{h, cc}: Removed AuthResolvers. Added _username and _password. Recognize username and password in URI. * src/main.cc: Use AuthConfigFactory instead of RequestFactory. * src/RequestGroup.cc: Use AuthConfigFactory instead of RequestFactory. * src/RequestFactory.{h, cc}: Removed. * src/AuthConfigFactory.{h, cc}: New class. * src/FtpConnection.cc: Use AuthConfigFactory. * src/HttpRequest.cc: Use AuthConfigFactory. * test/HttpRequestTest.cc: Updated. * test/RequestTest.cc: Updated. * test/AuthConfigFactoryTest.cc: New class. * test/RequestFactoryTest.cc: Removed.
* 2007-10-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-10-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added HTTP/1.1 keep alive and pipelining support. See --enable-http-keep-alive and --enable-http-pipelining option. * src/AbstractCommand.{h, cc}: Now it has one-to-many relation to Segment. * src/HttpDownloadCommand.{h, cc} * src/OptionHandlerFactory.cc * src/HttpConnection.{h, cc} * src/version_usage.cc * src/HttpInitiateConnectionCommand.cc * src/FtpInitiateConnectionCommand.cc * src/Segment.h * src/HttpRequestCommand.{h, cc} * src/option_processing.cc * src/prefs.h * src/HttpResponseCommand.cc * src/SegmentMan.{h, cc} * src/FtpNegotiateCommand.cc * src/HttpProxyResponseCommand.cc * src/Request.cc * src/HttpRequest.cc * src/DownloadCommand.cc * test/HttpRequestTest.cc * test/RequestTest.cc
* 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-10-141-0/+28
| | | | | | | * src/Request.cc (parseUrl): Removed unnecessary slashes around dir.
* 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-10-111-6/+6
| | | | | | | | | Do not send referer when redirected. * src/Request.cc (redirectUrl) * test/RequestTest.cc * test/HttpRequestTest.cc
* 2007-08-10 Ross Smith II <aria2spam at smithii dot com>Tatsuhiro Tsujikawa2007-08-151-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc 3.4.4 support: * src/DefaultBtContext.cc: int32_t -> int * src/main.cc: int -> int32_t, int32_t -> int * src/messageDigest.h: uint32_t -> unsigned int * src/NameResolver.h: int32_t -> int * src/PeerConnection.cc: int -> int32_t * src/SpeedCalc.cc: int32_t -> int * src/TrackerUpdateCommand.h: int -> int32_t * src/Util.cc: int32_t -> int * src/Util.h: int32_t -> int * src/Xml2MetalinkProcessor.cc: int -> uint32_t, int64_t -> uint64_t * test/AnnounceListTest.cc: int -> int32_t * test/ChunkedEncodingTest.cc: int -> int32_t * test/DataTest.cc: int -> int32_t * test/DefaultBtRequestFactoryTest.cc: int -> int32_t * test/DefaultPeerListProcessorTest.cc: int -> int32_t * test/DefaultPieceStorageTest.cc: int -> int32_t * test/FeatureConfigTest.cc: int -> int32_t * test/MetalinkEntryTest.cc: int -> int32_t * test/MockBtRequestFactory.h: int -> int32_t * test/MockPieceStorage.h: int -> int32_t * test/OptionTest.cc: int -> int32_t * test/RequestTest.cc: int -> int32_t * test/SegmentManTest.cc: int -> int32_t * test/Xml2MetalinkProcessorTest.cc: int -> int32_t
* 2007-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-08-081-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MessageDigestHelper is introduced in order to simplify the use of message digest. Removed repeated code. The message digest algorithm is now specified by string, like "sha1", "md5". * src/messageDigest.{h, cc} * src/MessageDigestHelper.{h, cc}: New class. * src/DefaultPieceStorage.cc * src/DefaultBtContext.{h, cc} (computeFastSet): New function. (setInfoHash): Added for unit testing. (setNumPieces): Added for unit testing. * src/DefaultBtInteractive.cc * src/BtPieceMessage.cc * src/Peer.cc * src/Checksum.h * src/message.h * src/IteratableChecksumValidator.h * src/ChunkChecksumValidator.{h, cc}: Use IteratableChecksumValidator inside it. * src/SegmentMan.{h, cc} (checkIntegrity): Removed. * src/IteratableChunkChecksumValidator.{h, cc} * src/Util.h (sha1Sum): Removed. (simpleMessageDigest): Removed. (fileChecksum): Removed. (computeFastSet): Removed. * src/ShaVisitor.cc * src/ChunkChecksum.h * src/DownloadCommand.cc Removed messageDigest virtual functions. * src/MultiDiskAdaptor.{h, cc} * src/DiskAdaptor.h * src/ByteArrayDiskWriter.h * src/DiskWriter.h * src/DiskAdaptorWriter.h * src/AbstractSingleDiskAdaptor.{h, cc} * src/AbstractDiskWriter.{h, cc} Fixed comilation error when message digest is disabled. * src/MetalinkEntry.{h, cc} * src/MetalinkRequestInfo.cc Removed srandom and random. * src/SimpleRandomizer.h Added size() virtual function to DiskAdaptor * src/MultiDiskAdaptor.h Fixed the bug that causes that files are not opened correctly in multi-file torrent. * src/TorrentRequestInfo.cc * src/MultiDiskAdaptor.cc Added SHA256 support * src/messageDigest.cc * src/Xml2MetalinkProcessor.cc Show supported message digest algorithms * src/main.cc Updated contact info. * src/main.cc
* 2007-03-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-03-211-94/+52
| | | | | | | | | | | | | | | * src/Request.h: Use AuthResolver to get authentication information. * src/main.cc: Made RequestFactory a singleton object. Netrc is now set to RequestFactory object. * src/AuthConfigItem.h, src/AuthConfigItem.cc: Removed. * src/AuthConfig.h, src/AuthConfig.cc: Rewritten. * src/TrackerWatcherComand.cc: Use RequestFactorySingletonHolder to create Request object.
* 2007-03-19 Tatsuhiro Tsujikawa <tujikawa at valkyrie dot rednoah com>Tatsuhiro Tsujikawa2007-03-181-1/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To integrate Netrc into exsiting classes: * src/Request.h (_userDefinedAuthConfig): New variable. (findNetrcAuthenticator): New function. (segment): Removed. (setUserDefinedAuthConfig): New function. (resolveHttpAuthConfigItem): New function. (resolveFtpAuthConfigItem): New function. (resolveHttpProxyAuthConfigItem): New function. * src/HttpRequest.h (authConfig): Removed. (proxyAuthConfig): Removed. (setAuthConfig): Removed. (setProxyAuthConfig): Removed. * src/UrlRequest.h (getHeadResult): Added a parameter: authConfigHandle * src/common.h (SingletonHolder.h): New include. * src/main.cc (Netrc.h): New include. (main): Removed initial values of PREF_FTP_USER, PREF_FTP_PASSWD. Added initial value of PREF_NETRC_PATH. Added the initialization of netrc. * src/AuthConfig.h: New class. * src/prefs.h (PREF_NETRC_PATH): New definition. * src/HttpAuthConfig.h: Removed. * src/Netrc.cc (getRequiredNextToken): New function. (skipMacdef): New function. (parse): Rewritten. * src/Netrc.h (getRequiredNextToken): New function. (skipMacdef): New function. * src/Util.h, src/Util.cc (getHomeDir): New function. * src/TrackerWatcherComand.cc (createRequestCommand): Use AuthConfig. * src/FtpConnection.cc (sendUser): Use Request::resolveFtpAuthConfigItem(). (sendPass): Use Request::resolveFtpAuthConfigItem(). * src/Request.cc (findNetrcAuthenticator): New function. (resolveHttpAuthConfigItem): New function. (resolveFtpAuthConfigItem): New function. (resolveHttpProxyAuthConfigItem): New function. * src/UrlRequestInfo.cc: Use AuthConfig. * src/HttpRequest.cc (createRequest): Use authConfig. (getProxyAuthString): Use authConfig. (configure): Removed PREF_HTTP_USER, PREF_HTTP_PASSWD, PREF_HTTP_PROXY_USER, PREF_HTTP_PROXY_PASSWD.
* 2006-07-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2006-07-201-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | To add the support for Metalink3.0 backward compatible links: * src/Request.h (SAFE_CHARS): Added '#'. (METALINK_MARK): New definition. * src/Request.cc (parseUrl): Added the support for Metalink3.0 backward compatible links. etc * src/PeerInteraction.cc (MsgPushBack): Removed. (sendMessages): Use STL copy and back_inserter. (rejectAllPieceMessageInQueue): Use STL copy and back_inserter. (rejectPieceMessageInQueue): Use STL copy and back_inserter. * src/TorrentMan.h (MAX_PEER_LIST_SIZE): Changed to 100 from 250.
* 2006-06-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2006-06-181-0/+53
| | | | | | | | | | | | | | | | | | | | * src/TorrentMan.cc (setupInternal1): Fixed peerId generation bug. * src/SimpleLogger.h (writeHeader): New function. * src/SimpleLogger.cc (writeHeader): New function. (writeLog): Fixed the bug that causes segfaults if exception message contains an unescaped "%" character. * src/TrackerWatcherCommand.cc (execute): Added a short sleep when a tracker request fails. * src/Request.cc (parseUrl): Query string is now handled properly.
* Added Referer supportTatsuhiro Tsujikawa2006-02-181-1/+36
|
* Initial importTatsuhiro Tsujikawa2006-02-171-0/+184