Commit Graph

22 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa
e34d0e7ffa Dont' return SharedHandle from HttpHeader::getRange() 2012-09-30 17:30:35 +09:00
Tatsuhiro Tsujikawa
54665ff409 Removed static std::string constant in HttpHeader
This change also removes inspection of Proxy-Connection header field
when checking whether the remote endpoint keeps connection open.
2012-09-23 21:46:01 +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
1b874268a0 Use int64_t instead of off_t
Some classes such as DiskAdaptor, DiskWriter, FileAllocationIterator
and ChecksumValidator are left unchanged.
2012-06-25 23:35:24 +09:00
Tatsuhiro Tsujikawa
5fc1b1ad29 Rewritten HTTP header parser 2012-06-23 17:34:20 +09:00
Tatsuhiro Tsujikawa
1e0068e4d4 WebSocket: Check keyword string in comma separeted values in HTTP
header field.
2012-04-08 19:00:07 +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
1d71626bea Supported multi-line HTTP header field value.
See http://tools.ietf.org/html/rfc2616#section-4.2
2011-01-20 00:25:01 +09:00
Tatsuhiro Tsujikawa
ea49e9c297 2010-11-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Made strings which are only used in comparison plain C strings.
	* src/HttpHeader.cc
	* src/HttpHeader.h
	* src/Netrc.cc
	* src/Netrc.h
	* test/HttpHeaderTest.cc
2010-11-25 12:13:33 +00: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
35cc4ed1e7 2010-10-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Return empty range if byte-range-resp-spec or instance-length is
	"*" in Content-Range header to prevent aria2 from emitting error
	failing to convert "*" to a integer.
	* src/HttpHeader.cc
	* test/HttpHeaderTest.cc
2010-10-31 07:56:01 +00:00
Tatsuhiro Tsujikawa
c342bde962 2010-02-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use vector instead of deque for containers which is used for
	mostly read-only purpose.
2010-02-28 12:30:11 +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
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
06644332c2 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Applied Ross's aria2-0.13.2+1-mingw-3.patch.
	* test/HttpHeaderTest.cc: Casted to off_t where it should.
	* test/HttpRequestTest.cc: Casted to off_t where it should.
2008-06-16 11:27:52 +00:00
Tatsuhiro Tsujikawa
8fab8859b1 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed misuse of multimap::find()
	* src/HttpHeader.cc
	* test/HttpHeaderTest.cc
2008-05-08 11:39:37 +00:00
Tatsuhiro Tsujikawa
42fa16b780 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Suppress content-range error when 'Content-Range' response header
	doesn't contains bytes-unit specifier 'bytes'
	* src/HttpHeader.cc (getRange)
	* test/HttpHeaderTest.cc
2008-03-15 04:25:55 +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
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
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