Commit Graph

24 Commits (a44c71586a42a2521dc9a0c6bd36f7aebe773c7c)

Author SHA1 Message Date
Tatsuhiro Tsujikawa 47402c5f29 Refactor HttpConnection and its neighbor objects 2013-06-26 23:19:15 +09:00
Tatsuhiro Tsujikawa 07d270c87e Require -std=c++11 and use std::shared_ptr instead of SharedHandle 2013-06-22 01:10:38 +09:00
Tatsuhiro Tsujikawa 8f2030da09 Removed HttpHeader::findAs{LL}Int and unused HttpResponse::{has,get}RetryAfter 2012-09-26 23:58:59 +09:00
Tatsuhiro Tsujikawa dd7014a612 Store only interesting HTTP headers in HttpHeader
In this change, we defined HTTP header fields we are interested in.
We only store those headers in HttpHeader object.  Accessing HTTP
headers in HttpHeader object is now done through enum values.
2012-09-23 20:59:34 +09:00
Tatsuhiro Tsujikawa b00ed1aa30 More http header parser tests 2012-07-06 00:57:18 +09:00
Tatsuhiro Tsujikawa 5fc1b1ad29 Rewritten HTTP header parser 2012-06-23 17:34:20 +09:00
Tatsuhiro Tsujikawa 12988e5282 Replaced uint64_t with off_t or int64_t.
Since off_t is int64_t with LFS, we cannot take advantage of extra
capacity of uint64_t.
2011-12-09 21:39:43 +09:00
Tatsuhiro Tsujikawa d17ea2837b HttpHeader::fill() now stores header name in lowercase.
Find methods in HttpHeader won't lowercase argument, so use lowercase
letters to get HTTP header field.
2011-11-11 22:50:18 +09:00
Tatsuhiro Tsujikawa e8d4deecad Rewritten HttpHeader::fill() 2011-11-03 00:31:27 +09:00
Tatsuhiro Tsujikawa d8d159ccd8 2010-11-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Replaced HttpHeader::responseStatus_ with HttpHeader::statusCode_.
	statusCode_ is of type int.
	* src/AbstractProxyResponseCommand.cc
	* src/FtpNegotiationCommand.cc
	* src/HttpHeader.cc
	* src/HttpHeader.h
	* src/HttpHeaderProcessor.cc
	* src/HttpResponse.cc
	* src/HttpResponse.h
	* src/HttpResponseCommand.cc
	* src/HttpSkipResponseCommand.cc
	* src/util.cc
	* src/util.h
	* test/HttpHeaderProcessorTest.cc
	* test/HttpHeaderTest.cc
	* test/HttpResponseTest.cc
	* test/UtilTest.cc
2010-11-15 12:52:03 +00:00
Tatsuhiro Tsujikawa 93e5dbed32 2010-11-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed SharedHandle::isNull(). Instead we added operator* and
	operator unspecified_bool_type. Removed use of WeakHandle and
	replaced with raw pointer.
2010-11-12 12:48:48 +00:00
Tatsuhiro Tsujikawa 4db349c1f3 2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Untabify. Fixed one line in copyright which is longer than 80
	columns.
	* src
	* test
2010-01-05 16:01:46 +00:00
Tatsuhiro Tsujikawa 0742e3921f 2009-01-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added experimental built-in HTTP server. Currently, when a
	client accesses to the server, it responds with the current
	download progress. By default, it is disabled. To enable the
	server, give --enable-http-server option.  To change the default
	port number for the server to listen to, use
	--http-server-listen-port option.
	The response HTML is very simple and refreshes it self each 1
	second.  Because of this refresh, you see flicker in normal web
	browser such as Firefox.  I recommend to use console-based
	browser such as elinks, w3m.  To connect to the server, run
	'elinks http://localhost:6800/' while running aria2. Please
	replace port number '6800'(which is default) with your
	preference.	
	* src/DownloadEngineFactory.cc
	* src/HttpHeader.cc
	* src/HttpHeader.h
	* src/HttpHeaderProcessor.cc
	* src/HttpHeaderProcessor.h
	* src/HttpListenCommand.cc
	* src/HttpListenCommand.h
	* src/HttpServer.cc
	* src/HttpServer.h
	* src/HttpServerCommand.cc
	* src/HttpServerCommand.h
	* src/HttpServerResponseCommand.cc
	* src/HttpServerResponseCommand.h
	* src/Makefile.am
	* src/OptionHandlerFactory.cc
	* src/Util.cc
	* src/Util.h
	* src/help_tags.h
	* src/option_processing.cc
	* src/prefs.cc
	* src/prefs.h
	* src/usage_text.h
	* test/HttpHeaderProcessorTest.cc
	* test/UtilTest.cc
2009-01-25 09:58:40 +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 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 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 8dacfe45b8 2008-03-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added missing include files for MinGW
	* test/HttpHeaderProcessorTest.cc
	* test/DHTRoutingTableSerializerTest.cc
	* test/DHTRoutingTableDeserializerTest.cc
	* test/UriListParserTest.cc
2008-03-13 13:13:53 +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 fc0fa4203a 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Use unsigned char for data store.
2008-03-07 12:05:50 +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 e26bbbb9ee Merged stable-0.11 branch changes r15 into the trunk. 2007-09-13 15:08:02 +00:00
Tatsuhiro Tsujikawa 729d566678 Fixed typo: threw -> thrown 2007-08-09 14:54:36 +00:00
Tatsuhiro Tsujikawa 19ef788023 Merged Ross's patch to test code. 2007-07-23 14:09:46 +00:00
Tatsuhiro Tsujikawa 055c9e0b21 2007-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Create directory structure specified in metalink file.
	* src/RequestGroup.h, src/RequestGroup.cc
	(initAndOpenFile): Create a directory to store files if it does 
not
	exist.
	(getDir): New function.
2007-07-01 10:40:30 +00:00