summaryrefslogtreecommitdiff
path: root/src/HttpHeader.h
Commit message (Collapse)AuthorAgeFilesLines
* clang-format-5.0Tatsuhiro Tsujikawa2017-11-231-1/+1
|
* make clang-format using clang-format-3.6Tatsuhiro Tsujikawa2015-12-271-3/+4
|
* Remove content-length and content-range if transfer-encoding is givenTatsuhiro Tsujikawa2015-11-041-0/+2
| | | | See GH-473
* Fixed some typos in code commentsDan Fandrich2015-01-161-1/+1
|
* Require -std=c++11 and use std::shared_ptr instead of SharedHandleTatsuhiro Tsujikawa2013-06-221-2/+0
|
* Hygiene: Fix some clang warnings, mostly unused private members.Nils Maier2013-03-011-1/+1
|
* Dont' return SharedHandle from HttpHeader::getRange()Tatsuhiro Tsujikawa2012-09-301-1/+1
|
* Removed *Handle typedefTatsuhiro Tsujikawa2012-09-281-2/+0
|
* Removed HttpHeader::findAs{LL}Int and unused HttpResponse::{has,get}RetryAfterTatsuhiro Tsujikawa2012-09-261-2/+0
|
* Removed proxy-connection from InterestingHeaderTatsuhiro Tsujikawa2012-09-231-1/+0
|
* Removed static std::string constant in HttpHeaderTatsuhiro Tsujikawa2012-09-231-6/+3
| | | | | 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-29/+45
| | | | | | 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.
* Rewritten HTTP header parserTatsuhiro Tsujikawa2012-06-231-6/+7
|
* WebSocket: Check keyword string in comma separeted values in HTTPTatsuhiro Tsujikawa2012-04-081-0/+5
| | | | header field.
* Replaced uint64_t with off_t or int64_t.Tatsuhiro Tsujikawa2011-12-091-2/+2
| | | | | Since off_t is int64_t with LFS, we cannot take advantage of extra capacity of uint64_t.
* HttpHeader::fill() now stores header name in lowercase.Tatsuhiro Tsujikawa2011-11-111-48/+21
| | | | | Find methods in HttpHeader won't lowercase argument, so use lowercase letters to get HTTP header field.
* Rewritten util::split and added its iterator version.Tatsuhiro Tsujikawa2011-11-041-0/+18
| | | | | Iterator based functions util::startsWith, util::endsWith, util::streq, util::strieq were added.
* Rewritten HttpHeader::fill()Tatsuhiro Tsujikawa2011-11-031-2/+3
|
* Added Metalink/HTTP Link and Digest header field parser.Tatsuhiro Tsujikawa2011-07-261-0/+7
|
* 2010-11-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-251-9/+9
| | | | | | | | | | | 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-28/+8
| | | | | | | | | | | | | | | | | | | | | | 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-2/+2
| | | | | | | | | 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-3/+3
| | | | | | Made #include guard consistent for c++ header files.
* 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-2/+2
| | | | | | | | Renamed member variables. * src/HttpHeader.cc * src/HttpHeader.h
* 2010-02-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-02-281-2/+2
| | | | | | | 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-1/+1
| | | | | | | | | Untabify. Fixed one line in copyright which is longer than 80 columns. * src * test
* 2009-05-29 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2009-05-291-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+3
| | | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | 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-0/+4
| | | | | | | | | Made string listeral to static const std::string: "Content-Range", "Content-Length" * src/HttpHeader.cc * src/HttpHeader.h
* 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-05-131-0/+20
| | | | | | | | | | Made string listeral to static const std::string. * src/HttpConnection.cc * src/HttpHeader.cc * src/HttpHeader.h * src/HttpResponse.cc
* 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-04-211-0/+18
| | | | | | | | | | | | | | | | | 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-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-03-091-2/+2
| | | | | | type cleanup for allmost all remaining files.
* 2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-02-081-9/+15
| | | | | | | | | Removed "using namespace std;" from all sources. Appended std:: prefix to c++ standard classes. Included string.h where mem* function are used.
* 2007-07-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-07-211-2/+2
| | | | | | | Converted int's to in32_t. long long int's are also converted to int64_t
* 2007-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-03-151-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-03-051-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/HttpHeader.h (Range.h): New include. (status): New variable. (HttpHeader): Initialized status with 0. (getStatus): New function. (setStatus): New function. (getRange): New function. (HttpHeaderHandle): New function. * src/HttpHeader.cc (getRange): New function. * src/Request.h (RequestWeakHandle): New definition. * src/HttpConnection.h (HttpConnectionHandle): New type definition. * src/HttpConnection.cc (receiveResponse): Set HTTP status to headers. * src/main.cc (showUsage): Fixed typo. * src/Segment.h (SegmentHandle): New type definition. * src/BitfieldMan.h (getMissingUnusedLength): New function. * src/BitfieldMan.cc (getMissingUnusedLength): New function.
* 2006-09-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2006-09-211-2/+15
| | | | | | | | * src/*.{h,cc}: Added an exception to the license which allows linking with OpenSSL.
* * replaced std::vector with std::deque.Tatsuhiro Tsujikawa2006-03-221-2/+2
|
* * Util.{h,cc}: added startsWith().Tatsuhiro Tsujikawa2006-02-281-0/+1
| | | | | | | | | | | | | | | | | | * CookieBox.cc: rewrited criteriaFind() using Util::startsWith() and Util::endsWith(). * SocketCore.cc: struct addrinfo is now zero-initialized. * common.h: added #include directive of limit.h. * DownloadEngine.cc: added #include directive of sys/time.h and algorithm. * Exception.h: added #include directive of stdio.h. * AbstractCommand.h: added #include directive of sys/time.h. * DownloadCommand.h: added #include directive of sys/time.h. * *.h: added #include directive of common.h to all base classes. subclasses' one was removed.
* (no commit message)Tatsuhiro Tsujikawa2006-02-211-0/+46