Moved URI parser code to uri.h, uri.cc to provide fast URI parser
without Request object initialization.
* src/Makefile.am
* src/Request.cc
* src/uri.cc
* src/uri.h
* test/Makefile.am
* test/RequestTest.cc
* test/UriTest.cc
Allow '@' in username and password embedded in URI. It should be
percent-encoded but many people use their mail address as an
username and forget about PE.
* src/Request.cc
* test/RequestTest.cc
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
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
Do not urlencode Request::url in setUrl() because we want
unmodified URL using Request::getUrl()
* src/Request.cc
* src/Request.h
* test/RequestTest.cc
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
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
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
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
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
* 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.
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.
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.
* 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.