summaryrefslogtreecommitdiff
path: root/src/HttpHeader.cc
Commit message (Collapse)AuthorAgeFilesLines
* Fixed some typos in code commentsDan Fandrich2015-01-161-1/+1
|
* Convert to autos and ranged loopsNils Maier2013-08-211-15/+9
|
* Remove vbegin and vend in favor of std::begin and std::endTatsuhiro Tsujikawa2013-06-241-4/+4
|
* Support off64_t for Android buildTatsuhiro Tsujikawa2013-05-061-4/+4
| | | | | | | | Android NDK R8e does not provide ftruncate64, but bionic has the assembler code to access kernel function. We borrowed those ftruncate64.S files from android source code repository. It turns out that x86 asm.h in NDK R8e is also broken, so latest asm.h was also borrowed.
* Initialized scalar membersTatsuhiro Tsujikawa2012-10-291-1/+4
|
* Dont' return SharedHandle from HttpHeader::getRange()Tatsuhiro Tsujikawa2012-09-301-8/+7
|
* Removed *Handle typedefTatsuhiro Tsujikawa2012-09-281-1/+1
|
* Use nothrow version of parseInt, parseUInt and parseLLIntTatsuhiro Tsujikawa2012-09-271-8/+10
|
* Removed HttpHeader::findAs{LL}Int and unused HttpResponse::{has,get}RetryAfterTatsuhiro Tsujikawa2012-09-261-20/+0
|
* Removed proxy-connection from InterestingHeaderTatsuhiro Tsujikawa2012-09-231-1/+0
|
* Removed static std::string constant in HttpHeaderTatsuhiro Tsujikawa2012-09-231-7/+7
| | | | | This change also removes inspection of Proxy-Connection header field when checking whether the remote endpoint keeps connection open.
* Store only interesting HTTP headers in HttpHeaderTatsuhiro Tsujikawa2012-09-231-43/+66
| | | | | | 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.
* Use PRId64 for int64_t format specifierTatsuhiro Tsujikawa2012-06-251-7/+4
|
* Rewritten HTTP header parserTatsuhiro Tsujikawa2012-06-231-47/+10
|
* WebSocket: Check keyword string in comma separeted values in HTTPTatsuhiro Tsujikawa2012-04-081-0/+24
| | | | header field.
* Check totalLength of file is less than std::numeric_limits<off_t>::max()Tatsuhiro Tsujikawa2011-12-091-6/+21
| | | | | If totalLength is larger than std::numeric_limits<off_t>::max(), throw DownloadFailureException.
* Replaced uint64_t with off_t or int64_t.Tatsuhiro Tsujikawa2011-12-091-7/+20
| | | | | Since off_t is int64_t with LFS, we cannot take advantage of extra capacity of uint64_t.
* Don't append character to std::string.Tatsuhiro Tsujikawa2011-11-121-1/+1
|
* Rewritten parse*IntTatsuhiro Tsujikawa2011-11-121-6/+6
|
* HttpHeader::fill() now stores header name in lowercase.Tatsuhiro Tsujikawa2011-11-111-56/+71
| | | | | Find methods in HttpHeader won't lowercase argument, so use lowercase letters to get HTTP header field.
* Changed parse*Int functions so that it accepts iterators.Tatsuhiro Tsujikawa2011-11-031-7/+8
|
* Rewritten util::stripIter(), which now returns pair of iterator.Tatsuhiro Tsujikawa2011-11-031-21/+3
|
* Rewritten HttpHeader::fill()Tatsuhiro Tsujikawa2011-11-031-46/+81
|
* Added Metalink/HTTP Link and Digest header field parser.Tatsuhiro Tsujikawa2011-07-261-0/+12
|
* Supported multi-line HTTP header field value.Tatsuhiro Tsujikawa2011-01-201-5/+16
| | | | See http://tools.ietf.org/html/rfc2616#section-4.2
* 2010-11-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-251-9/+5
| | | | | | | | | | | 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-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-151-27/+0
| | | | | | | | | | | | | | | | | | | | | | 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-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-141-0/+3
| | | | | | | | | Added .cc file for classes/structs that only provided by header file. Defined non-POD classes' ctor, dtor in .cc file. Moved implementation code in header file to .cc file for major classes/strucsts.
* 2010-10-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-10-311-0/+8
| | | | | | | | | | 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-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-10-101-4/+4
| | | | | | | | | | | | | | | | | | | Replaced util::split(a,b,c) and util::split(a,b) with util::divide() * src/ExpatMetalinkProcessor.cc * src/FtpConnection.cc * src/HttpHeader.cc * src/HttpResponse.cc * src/HttpServer.cc * src/OptionParser.cc * src/ParameterizedStringParser.cc * src/ServerStatMan.cc * src/magnet.cc * src/util.cc * src/util.h * test/UtilTest.cc
* 2010-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-10-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Use util::strip() instead of util::trim() * src/ExpatXmlRpcRequestProcessor.cc * src/FeatureConfig.cc * src/HttpHeader.cc * src/MetalinkParserStateV3Impl.cc * src/OptionHandlerImpl.h * src/ServerStatMan.cc * src/UriListParser.cc * src/Xml2XmlRpcRequestProcessor.cc * src/bittorrent_helper.cc * src/cookie_helper.cc * src/messageDigest.cc * src/util.cc * src/util.h * test/FeatureConfigTest.cc * test/HttpRequestTest.cc * test/UriListParserTest.cc * test/UtilTest.cc
* 2010-07-16 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-07-161-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added --conditional-get option. Download file only when the local file is older than remote file. This function only works with HTTP(S) downloads only. It does not work if file size is specified in Metalink. It also ignores Content-Disposition header. If a control file exists, this option will be ignored. This function uses If-Modified-Since header to get only newer file conditionally. When getting modification time of local file, it uses user supplied filename(see --out option) or filename part in URI if --out is not specified. * doc/aria2c.1.txt * src/HttpHeader.cc * src/HttpHeader.h * src/HttpRequest.cc * src/HttpRequest.h * src/HttpRequestCommand.cc * src/HttpResponse.cc * src/HttpResponseCommand.cc * src/OptionHandlerFactory.cc * src/TimeA2.cc * src/TimeA2.h * src/prefs.cc * src/prefs.h * src/usage_text.h * test/HttpResponseTest.cc * test/TimeTest.cc
* 2010-06-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-211-10/+10
| | | | | | | Changed naming standards for class member variable: now it looks like var_ instead of _var.
* 2010-06-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-121-8/+10
| | | | | | | | Renamed member variables. * src/HttpHeader.cc * src/HttpHeader.h
* 2010-03-01 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-02-281-1/+2
| | | | | | | | Avoid to calculate end() iterator in each loop. std::deque is particularly slow. Make sure that recalculate end iterator if element is erased during loop.
* 2010-02-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-02-281-10/+8
| | | | | | | Use vector instead of deque for containers which is used for mostly read-only purpose.
* 2010-01-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-01-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | aria2 now returns gzip compressed XML-RPC response if XML-RPC client accepts gzip content encoding. * src/A2STR.cc * src/A2STR.h * src/GZipEncoder.cc * src/GZipEncoder.h * src/HttpHeader.cc * src/HttpHeader.h * src/HttpServer.cc * src/HttpServer.h * src/HttpServerBodyCommand.cc * src/HttpServerCommand.cc * src/Makefile.am * src/XmlRpcResponse.cc * src/XmlRpcResponse.h * test/GZipEncoderTest.cc * test/Makefile.am
* 2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-01-051-3/+3
| | | | | | | | | Untabify. Fixed one line in copyright which is longer than 80 columns. * src * test
* 2009-10-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-10-221-1/+1
| | | | | | | | | | Renamed Util.{cc,h} as util.{cc,h} * src/Util.cc * src/Util.h * src/util.cc * src/util.h
* 2009-10-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-10-221-14/+14
| | | | | | | | Moved static functions in Util class to namespace util. * src * test
* 2009-08-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-08-301-2/+4
| | | | | | | | | Fixed the bug that HTTP request header for XML-RPC request is not parsed properly. * src/HttpHeader.cc * src/HttpHeaderProcessor.cc
* 2009-05-29 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-05-291-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented getter methods in header files to give them more chance of optimization. Return const reference for SharadHandle if possible. * src/AbstractAuthResolver.cc * src/AbstractAuthResolver.h * src/AbstractBtMessage.cc * src/AbstractBtMessage.h * src/AbstractSingleDiskAdaptor.cc * src/AbstractSingleDiskAdaptor.h * src/AsyncNameResolver.cc * src/AsyncNameResolver.h * src/BNode.cc * src/BNode.h * src/BitfieldMan.cc * src/BitfieldMan.h * src/BtAbortOutstandingRequestEvent.h * src/BtExtendedMessage.cc * src/BtExtendedMessage.h * src/BtSeederStateChoke.cc * src/BtSeederStateChoke.h * src/Cookie.cc * src/Cookie.h * src/DHTBucket.cc * src/DHTBucket.h * src/DHTConnectionImpl.cc * src/DHTConnectionImpl.h * src/DHTFindNodeReplyMessage.cc * src/DHTFindNodeReplyMessage.h * src/DHTGetPeersReplyMessage.cc * src/DHTGetPeersReplyMessage.h * src/DHTInteractionCommand.cc * src/DHTMessage.cc * src/DHTMessage.h * src/DHTMessageDispatcherImpl.cc * src/DHTMessageEntry.cc * src/DHTMessageReceiver.cc * src/DHTMessageReceiver.h * src/DHTMessageTrackerEntry.cc * src/DHTMessageTrackerEntry.h * src/DHTPeerAnnounceEntry.cc * src/DHTPeerAnnounceEntry.h * src/DHTPeerLookupTask.cc * src/DHTPeerLookupTask.h * src/DHTRoutingTableDeserializer.cc * src/DHTRoutingTableDeserializer.h * src/DefaultBtAnnounce.cc * src/DefaultBtAnnounce.h * src/DefaultBtMessageDispatcher.cc * src/DefaultBtMessageDispatcher.h * src/DefaultBtRequestFactory.cc * src/DefaultBtRequestFactory.h * src/DiskAdaptor.cc * src/DiskAdaptor.h * src/DownloadContext.cc * src/DownloadContext.h * src/DownloadEngine.cc * src/DownloadEngine.h * src/EpollEventPoll.cc * src/EpollEventPoll.h * src/FtpConnection.cc * src/FtpConnection.h * src/HttpConnection.cc * src/HttpConnection.h * src/HttpHeader.cc * src/HttpHeader.h * src/HttpRequest.cc * src/HttpRequest.h * src/HttpResponse.cc * src/HttpResponse.h * src/LibsslTLSContext.cc * src/LibsslTLSContext.h * src/MSEHandshake.cc * src/MSEHandshake.h * src/MetalinkEntry.cc * src/MetalinkEntry.h * src/MetalinkParserController.cc * src/MetalinkParserController.h * src/MetalinkParserStateMachine.cc * src/MetalinkParserStateMachine.h * src/MultiDiskAdaptor.cc * src/MultiDiskAdaptor.h * src/NetrcAuthResolver.cc * src/NetrcAuthResolver.h * src/Peer.cc * src/Peer.h * src/PeerSessionResource.cc * src/PeerSessionResource.h * src/Piece.cc * src/Piece.h * src/PieceStatMan.cc * src/PieceStatMan.h * src/Request.cc * src/Request.h * src/RequestGroup.cc * src/RequestGroup.h * src/RequestGroupMan.cc * src/RequestGroupMan.h * src/RequestSlot.cc * src/RequestSlot.h * src/SegmentMan.cc * src/SegmentMan.h * src/SelectEventPoll.cc * src/SelectEventPoll.h * src/ServerStat.cc * src/ServerStat.h * src/Signature.cc * src/Signature.h * src/URIResult.cc * src/URIResult.h * src/UTPexExtensionMessage.cc * src/UTPexExtensionMessage.h
* 2009-01-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-01-251-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* 2008-09-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-09-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented the ability to get timestamp from remote HTTP server and apply it to local file. To enable this feature, --remote-time option is added. No usage text has been written yet. If several servers returns difference timestamp, then aria2 uses latest one. * src/CopyDiskAdaptor.cc * src/CopyDiskAdaptor.h * src/DirectDiskAdaptor.cc * src/DirectDiskAdaptor.h * src/DiskAdaptor.h * src/File.cc * src/File.h * src/HttpHeader.cc * src/HttpHeader.h * src/HttpResponse.cc * src/HttpResponse.h * src/HttpResponseCommand.cc * src/HttpResponseCommand.h * src/MultiDiskAdaptor.cc * src/MultiDiskAdaptor.h * src/OptionHandlerFactory.cc * src/RequestGroup.cc * src/RequestGroup.h * src/RequestGroupMan.cc * src/option_processing.cc * src/prefs.cc * src/prefs.h * test/CopyDiskAdaptorTest.cc * test/FileTest.cc * test/Makefile.am * test/Makefile.in * test/MultiDiskAdaptorTest.cc * test/TestUtil.cc
* 2008-07-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-07-181-0/+5
| | | | | | | | | | | | | | | | 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-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-06-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-05-181-3/+10
| | | | | | * src/HttpHeader.cc (get): Rewritten.
* 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-05-181-4/+4
| | | | | | | | Make HttpHeader::getFirst(...) return const reference. * src/HttpHeader.cc * src/HttpHeader.h
* 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-05-141-0/+10
| | | | | | | | | | | | Defined HTTP status as static const std::string * src/AbstractProxyResponseCommand.cc * src/HttpHeader.cc * src/HttpHeader.h * src/HttpResponse.cc * src/HttpResponseCommand.cc * src/HttpSkipResponseCommand.cc
* 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-05-131-2/+6
| | | | | | | | | Made string listeral to static const std::string: "Content-Range", "Content-Length" * src/HttpHeader.cc * src/HttpHeader.h