Commit Graph

21 Commits (6d01f8f94ff83241fbae5130d1904e03a08945aa)

Author SHA1 Message Date
Tatsuhiro Tsujikawa 8fab0ff216 2008-11-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
AuthConfigFactory is now part of DownloadEngine.
	* src/AbstractProxyRequestCommand.cc
	* src/AuthConfigFactory.h
	* src/DownloadEngine.cc
	* src/DownloadEngine.h
	* src/FtpConnection.cc
	* src/FtpConnection.h
	* src/FtpNegotiationCommand.cc
	* src/HttpConnection.cc
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* src/HttpRequestCommand.cc
	* src/HttpResponse.cc
	* src/HttpResponseCommand.cc
	* src/HttpSkipResponseCommand.cc
	* src/MultiUrlRequestInfo.cc
	* src/main.cc
	* test/FtpConnectionTest.cc
	* test/HttpRequestTest.cc
	* test/HttpResponseTest.cc
2008-11-03 10:06:25 +00:00
Tatsuhiro Tsujikawa c682371a58 2008-10-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Don't set Request::supportsPersistentConnection() in 
HttpConnection
	since this code is also used in AbstractProxyResponseCommand.
	Moved those code to HttpResponse.
	* src/HttpResponse.cc
	* src/HttpResponse.h
	* src/HttpConnection.cc
	* src/HttpConnection.h
	* src/HttpResponseCommand.cc
	* test/HttpResponseTest.cc
2008-09-30 15:54:50 +00:00
Tatsuhiro Tsujikawa b624a12ed0 2008-09-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Parse `expires' of Set-Cookie using Time::parseHTTPDate()
	* src/CookieParser.cc
	* test/CookieParserTest.cc
	* test/HttpResponseTest.cc
2008-09-07 04:36:41 +00:00
Tatsuhiro Tsujikawa 398d53f5f5 2008-09-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Use CookieStorage class instead of CookieBox class.
	Now CookieStorage accepts cookies from numeric host such as 
192.168.1.1.
	* src/AbstractProxyRequestCommand.cc
	* src/CookieStorage.cc
	* src/DownloadEngine.cc
	* src/DownloadEngine.h
	* src/HttpConnection.cc
	* src/HttpConnection.h
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* src/HttpRequestCommand.cc
	* src/HttpResponse.cc
	* src/HttpResponseCommand.cc
	* src/HttpSkipResponseCommand.cc
	* src/Makefile.am
	* src/MultiUrlRequestInfo.cc
	* src/Request.cc
	* src/Request.h
	* src/main.cc
	* test/AllTest.cc
	* test/CookieStorageTest.cc
	* test/CookieTest.cc
	* test/HttpRequestTest.cc
	* test/HttpResponseTest.cc
	* test/Makefile.am
	* test/NsCookieParserTest.cc
	* test/Sqlite3MozCookieParserTest.cc
	* test/nscookietest.txt
2008-09-01 13:46:03 +00:00
Tatsuhiro Tsujikawa f7e3651d91 2008-07-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Applied tizianomueller's patch to fix compile error.
	* test/BitfieldManTest.cc
	* test/BtRequestMessageTest.cc
	* test/DefaultBtContextTest.cc
	* test/DefaultDiskWriterTest.cc
	* test/DefaultPieceStorageTest.cc
	* test/HttpHeaderProcessorTest.cc
	* test/HttpResponseTest.cc
	* test/Metalink2RequestGroupTest.cc
	* test/MetalinkParserControllerTest.cc
	* test/MetalinkProcessorTest.cc
	* test/PeerSessionResourceTest.cc
	* test/UtilTest.cc
2008-07-31 12:28:12 +00:00
Tatsuhiro Tsujikawa 5d2651c5ed 2008-07-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
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-07-18 15:20:52 +00:00
Tatsuhiro Tsujikawa 92c66d24ac 2008-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Rewritten ChunkedEncoding class as ChunkedDecoder class.
	* src/A2STR.cc
	* src/A2STR.h
	* src/ChunkedDecoder.cc
	* src/ChunkedDecoder.h
	* src/ChunkedEncoding.cc: Removed
	* src/ChunkedEncoding.h: Removed
	* src/DownloadCommand.cc
	* src/DownloadCommand.h
	* src/HttpDownloadCommand.cc
	* src/HttpResponse.cc
	* src/HttpResponse.h
	* src/HttpResponseCommand.cc
	* src/HttpSkipResponseCommand.cc
	* src/HttpSkipResponseCommand.h
	* src/Makefile.am
	* src/TransferEncoding.h: Removed
	* test/ChunkedDecoderTest.cc
	* test/ChunkedEncodingTest.cc: Removed
	* test/HttpResponseTest.cc
	* test/Makefile.am
2008-07-01 11:38:25 +00:00
Tatsuhiro Tsujikawa d791807add 2008-06-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added gzip, deflate decoding support in HTTP using libz. If 
compiled
	with this feature, aria2 sends "Accept-Encoding: deflate, gzip" 
header
	to a HTTP server. If a server returns "Content-Encoding: gzip" 
or
	"Content-Encoding: deflate" then, aria2 decodes the response 
body on the
	fly and writes decoded data to a local disk.
	* README
	* README.html
	* configure.ac
	* m4/aria2_arg.m4: Added ARIA2_ARG_WITH and ARIA2_ARG_ENABLE, 
they are
	wrapper function for AC_ARG_WITH and AC_ARG_ENABLE respectively.
	* m4/libz.m4
	* src/Decoder.h
	* src/DownloadCommand.cc
	* src/DownloadCommand.h
	* src/Exception.h
	* src/GZipDecoder.cc
	* src/GZipDecoder.h
	* src/HttpHeader.cc
	* src/HttpHeader.h
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* src/HttpResponse.cc
	* src/HttpResponse.h
	* src/HttpResponseCommand.cc
	* src/Makefile.am
	* test/GZipDecoderTest.cc
	* test/HttpRequestTest.cc
	* test/HttpResponseTest.cc
	* test/Makefile.am
	* test/Makefile.in
	* test/gzip_decode_test.gz
2008-06-29 14:29:36 +00:00
Tatsuhiro Tsujikawa 03db925988 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Pool connection when a server returns 4xx, 5xx responses.
	* src/HttpNullDownloadCommand.cc
	* src/HttpNullDownloadCommand.h
	* src/HttpResponse.cc
	* src/HttpResponse.h
	* src/HttpResponseCommand.cc
	* src/HttpResponseCommand.h
	* test/HttpResponseTest.cc
2008-05-10 04:50:49 +00:00
Tatsuhiro Tsujikawa 1ef99931e1 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Rewritten Exception class. Throw exception object, not its pointer and
	catch by reference, so that remove problematic delete operator for
	catched exception.
	* src/Exception.cc
	* src/Exception.h
	* test/ExceptionTest.cc
	* src/*: All files throwing/catching exception.
	* test/*: All files throwing/catching exception.
2008-04-27 02:22:14 +00:00
Tatsuhiro Tsujikawa 1c7c6f9898 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
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-04-22 07:15:35 +00:00
Tatsuhiro Tsujikawa e1fa62e6c7 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Now HTTP status and version are a member variable of HttpHeader.
	HTTP status is processed as a string, not integer.
	* src/AbstractProxyResponseCommand.cc
	* src/HttpConnection.cc
	* src/HttpHeader.cc
	* src/HttpHeader.h
	* src/HttpHeaderProcessor.cc
	* src/HttpHeaderProcessor.h
	* src/HttpResponse.cc
	* src/HttpResponse.h
	* test/HttpHeaderProcessorTest.cc
	* test/HttpResponseTest.cc
2008-04-21 10:48:11 +00:00
Tatsuhiro Tsujikawa 3505201f33 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Rewritten SharedHandle. Now copy constructor taking raw pointer 
has
	keyword explicit and SharedHandle's default constructor 
initializes
	its internal obj to null, old implementation initializes it 
using
	obj's default constructor.
	To assign null, write SharedHandle<T> x(...); x.reset();
	TODO: test/SharedHandleTest.cc needs more tests.
	* src/SharedHandle.h
2008-04-20 00:50:22 +00:00
Tatsuhiro Tsujikawa 032c7c2808 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
type cleanup for allmost all remaining files.
2008-03-09 12:24:01 +00:00
Tatsuhiro Tsujikawa 55552adb93 2008-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Included missing iostream.
	* test/AllTest.cc
	* test/BtDependencyTest.cc
	* test/BtExtendedMessageTest.cc
	* test/DHTConnectionImplTest.cc
	* test/DHTMessageFactoryImplTest.cc
	* test/DHTMessageTrackerEntryTest.cc
	* test/DHTNodeTest.cc
	* test/DHTRoutingTableSerializerTest.cc
	* test/DefaultBtAnnounceTest.cc
	* test/DefaultBtContextTest.cc
	* test/DefaultBtMessageFactoryTest.cc
	* test/DefaultExtensionMessageFactoryTest.cc
	* test/HandshakeExtensionMessageTest.cc
	* test/HttpResponseTest.cc
	* test/MetalinkProcessorTest.cc
	* test/MultiFileAllocationIteratorTest.cc
	* test/SocketCoreTest.cc
	* test/UTPexExtensionMessageTest.cc
2008-03-03 11:30:12 +00:00
Tatsuhiro Tsujikawa 1b7c198289 2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed "using namespace std;" from all sources. Appended std:: 
prefix to c++
	standard classes.
	Included string.h where mem* function are used.
2008-02-08 15:53:45 +00:00
Tatsuhiro Tsujikawa fac8e1d273 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Set Content-Type to SingleFileDownloadContext when http response 
is
	received.
	* src/HttpResponseCommand.cc
	* src/HttpResponse.{h, cc}
	* test/HttpResponseTest.cc
2007-11-27 12:45:29 +00:00
Tatsuhiro Tsujikawa 048a2cf597 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Implemented BitTorrent/http/ftp integrated download.
	I've rewritten lots of files and now some headers have forward
	class declarations to reduce compile time.
	The implementation is extremely alpha stage, I recommend to use this
	for testing purpose only.
2007-10-11 16:58:24 +00:00
Tatsuhiro Tsujikawa 729d566678 Fixed typo: threw -> thrown 2007-08-09 14:54:36 +00:00
Tatsuhiro Tsujikawa ccdd5b31a3 2007-06-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* src/FileAllocationCommand.cc: Derived from RealtimeCommand.
	* src/CheckIntegrityCommand.cc: Derived from RealtimeCommand.
	
	* src/MetalinkEntry.h
	(checksum): Changed to ChecksumHandle
	* src/MetalinkRequestInfo.cc
	(checksum): Changed to ChecksumHandle

	* src/File.cc
	(mkdirs): OPEN_MODE -> DIR_OPEN_MODE
	* src/common.h
	(DIR_OPEN_MODE): New definition

	* src/RequestGroup.cc
	(prepareForNextAction): Added an argument.

	* src/message.h
	(MSG_GOOD_CHECKSUM): New definition
	(MSG_BAD_CHECKSUM): New definition

	* src/HttpResponseCommand.cc
	(handleDefaultEncoding): Continue download sequence in new
	non-segmented download.

	* src/FileAllocationEntry.h
	(_nextDownloadCommand): New variable.

	* src/DownloadCommand.cc
	(prepareForNextSegment): Create ChecksumCommand if checksum is
	available.	

	* src/RealtimeCommand.h, src/RealtimeCommand.cc: New class.

	* src/IteratableChecksumValidator.h,
	src/IteratableChecksumValidator.cc: New class.

	* src/ChecksumCommand.h, src/ChecksumCommand.cc: New class.
2007-05-31 15:56:20 +00:00
Tatsuhiro Tsujikawa 11907c175d 2007-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
To handle Segment as SegmentHandle:
	* src/AbstractCommand.cc (execute): Rewritten.
	* src/SegmentMan.h: Segment -> SegmentHandle

	Introducded HttpResponse class, HttpRequest class to improve 
code
	extensiveness and make it clear:
	* src/HttpDownloadCommand.cc: transfer encoders are now managed 
by
	HttpResponse class.
	* src/HttpRequest.h, src/HttpRequest.cc: New class.
	* src/HttpResponse.h, src/HttpResponse.cc: New class.
	* src/HttpConnection.cc: Contruction of http request were moved 
to
	HttpRequest class.
	* src/HttpResponseCommand.h, src/HttpResponseCommand.cc: 
Refactored.
	* src/HttpRequestCommand.cc (executeInternal): Rewritten.
	* src/HttpAuthConfig.h: New class.
	* src/Range.h: New class.
	
	To make FtpTunnel{Request, Response}Command and
	HttpProxy{Request, Response}Command derived from
	AbstractProxy{Request, Response}Command:
	* src/FtpTunnelResponseCommand.h, 
src/FtpTunnelResponseCommand.cc:
	Derived from AbstractProxyRequestCommand class.
	* src/FtpTunnelRequestCommand.h, src/FtpTunnelRequestCommand.cc:
	Derived from AbstractProxyResponseCommand class.
	* src/HttpProxyRequestCommand.h, src/HttpProxyRequestCommand.cc:
	Derived from AbstractProxyRequestCommand class.
	* src/HttpProxyResponseCommand.h, 
src/HttpProxyResponseCommand.cc:
	Derived from AbstractProxyResponseCommand class.
	* src/AbstractProxyRequestCommand.h, 
src/AbstractProxyRequestCommand.cc
	: New class.
	* src/AbstractProxyResponseCommand.h,
	src/AbstractProxyResponseCommand.cc: New class.

	To add netrc support:
	* src/Netrc.h, src/Netrc.cc: New class.
	* src/Util.h, src/Util.cc (split): New function.
	
	* src/HttpHeader.cc (getRange): Fixed so that it inspects
	"Content-Range" header instead of "Range" header.
	* src/HttpHeader.h
	(getStatus): Removed.
	(setStatus): Removed.

	* src/Segment.h
	(getPositionToWrite): New function.
2007-03-15 15:07:18 +00:00