summaryrefslogtreecommitdiff
path: root/src/HttpResponse.cc
Commit message (Collapse)AuthorAgeFilesLines
* Dont' return SharedHandle from HttpHeader::getRange()Tatsuhiro Tsujikawa2012-09-301-6/+6
|
* Removed *Handle typedefTatsuhiro Tsujikawa2012-09-281-1/+1
|
* Removed HttpHeader::findAs{LL}Int and unused HttpResponse::{has,get}RetryAfterTatsuhiro Tsujikawa2012-09-261-10/+0
|
* Removed static std::string constant in HttpHeaderTatsuhiro Tsujikawa2012-09-231-22/+4
| | | | | 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-7/+6
| | | | | | 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.
* Removed static_cast<int64>()s where they are unnecessaryTatsuhiro Tsujikawa2012-06-251-6/+6
|
* Use int64_t instead of off_tTatsuhiro Tsujikawa2012-06-251-2/+2
| | | | | Some classes such as DiskAdaptor, DiskWriter, FileAllocationIterator and ChecksumValidator are left unchanged.
* Use PRId64 for int64_t format specifierTatsuhiro Tsujikawa2012-06-251-7/+7
|
* Replaced uint64_t with off_t or int64_t.Tatsuhiro Tsujikawa2011-12-091-3/+3
| | | | | Since off_t is int64_t with LFS, we cannot take advantage of extra capacity of uint64_t.
* Use fmt instead of util::itosTatsuhiro Tsujikawa2011-11-131-6/+6
|
* Rewritten parse*IntTatsuhiro Tsujikawa2011-11-121-1/+1
|
* HttpHeader::fill() now stores header name in lowercase.Tatsuhiro Tsujikawa2011-11-111-18/+27
| | | | | Find methods in HttpHeader won't lowercase argument, so use lowercase letters to get HTTP header field.
* Rewritten base64::decode and base64::encodeTatsuhiro Tsujikawa2011-11-051-1/+1
|
* mv Base64.{cc,h} base64.{cc,h}Tatsuhiro Tsujikawa2011-11-051-1/+1
|
* Rewritten util::split and added its iterator version.Tatsuhiro Tsujikawa2011-11-041-2/+6
| | | | | Iterator based functions util::startsWith, util::endsWith, util::streq, util::strieq were added.
* util::divide now takes iterators as arguments.Tatsuhiro Tsujikawa2011-11-031-3/+4
|
* util::percentDecode now takes iterators as arguments.Tatsuhiro Tsujikawa2011-11-031-1/+3
|
* Changed parse*Int functions so that it accepts iterators.Tatsuhiro Tsujikawa2011-11-031-1/+1
|
* Rewritten util::stripIter(), which now returns pair of iterator.Tatsuhiro Tsujikawa2011-11-031-3/+4
|
* Stored hash value as raw byte string, instead of hex digest.Tatsuhiro Tsujikawa2011-10-131-3/+4
|
* Removed redundant MessageDigest::supports() call.Tatsuhiro Tsujikawa2011-08-231-3/+0
| | | | | MessageDigest::supports() will be called from MessageDigest::isValidHash() later in the function.
* Percent-encode non-printable ASCII and non-ASCII chars in FileEntry.Tatsuhiro Tsujikawa2011-08-071-1/+2
| | | | | | | Percent-encode non-printable ASCII and non-ASCII chars in URI using util::percentEncodeMini() when URI is added to FileEntry. Removed percent-encode from Request. Also do percent-encoding when setting referer and redirected URI.
* Made getRedirectURI and getTransferEncoding return const reference.Tatsuhiro Tsujikawa2011-08-071-2/+2
| | | | | Made getRedirectURI and getTransferEncoding in HttpResponse return const reference.
* Consistent naming scheme for hash type and digest.Tatsuhiro Tsujikawa2011-07-271-2/+2
|
* Use HttpHeader::getIterator() instead of HttpHeader::get()Tatsuhiro Tsujikawa2011-07-271-4/+6
|
* HttpResponse::getDigest() now returns all Digest.Tatsuhiro Tsujikawa2011-07-271-13/+26
| | | | | In addition, HttpResponse::getMetalinkHttpEntries() does not check validity of URI. It is checked when we add it to FileEntry.
* Added Metalink/HTTP Link and Digest header field parser.Tatsuhiro Tsujikawa2011-07-261-0/+139
|
* Replaced HAVE_LIBZ with HAVE_ZLIBTatsuhiro Tsujikawa2011-02-181-4/+4
|
* Accept HTTP 304 reply as success when If-None-Match request-headerTatsuhiro Tsujikawa2011-01-291-2/+2
| | | | | | | field is specified using --header option. When --conditional-get is used, --allow-overwrite is now required to overwrite existing file.
* Added more error code values.Tatsuhiro Tsujikawa2010-12-011-3/+7
| | | | | I have not set error code for all exception invocation. In this change, I set error code where error likely occurs.
* Renamed DownloadErrorCode.h as error_code.h. RenamedTatsuhiro Tsujikawa2010-11-281-1/+1
| | | | downloaderrorcode::Value as error_code::Value.
* 2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-201-4/+4
| | | | | | | | Use format specifier %lld for cuid_t. Defined cuid_t as long long int instead of int64_t, since g++ complains int64_t is not suitable for %lld.
* 2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-201-16/+12
| | | | | | Replaced StringFormat with fmt
* 2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-201-10/+9
| | | | | | | Rewritten Logger interface. Logger now writes source file name and line number in log file.
* 2010-11-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-151-20/+17
| | | | | | | | | | | | | | | | | | | | | | 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-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-121-3/+3
| | | | | | | | Removed SharedHandle::isNull(). Instead we added operator* and operator unspecified_bool_type. Removed use of WeakHandle and replaced with raw pointer.
* 2010-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-10-101-2/+3
| | | | | | | | | | | | | | | | | | | 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-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-10-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewritten Cookie class and Cookie parser based on http://tools.ietf.org/html/draft-ietf-httpstate-cookie-14 with some modifications. When parsing cookie date, match time first so that it parses asctime() format. The request-path must be ends with '/' so that request-path '/foo/' path-matches cookie-path '/foo' and '/foo/' in the proposed algorithm. * src/Cookie.cc * src/Cookie.h * src/CookieParser.cc: Removed * src/CookieParser.h: Removed * src/CookieStorage.cc * src/CookieStorage.h * src/HttpResponse.cc * src/Makefile.am * src/Makefile.in * src/MultiUrlRequestInfo.cc * src/NsCookieParser.cc * src/NsCookieParser.h * src/Sqlite3CookieParser.cc * src/Sqlite3CookieParser.h * src/a2functional.h * src/cookie_helper.cc * src/cookie_helper.h * src/util.cc * src/util.h * test/CookieBoxFactoryTest.cc: Removed * test/CookieHelperTest.cc * test/CookieParserTest.cc: Removed * test/CookieStorageTest.cc * test/CookieTest.cc * test/HttpRequestTest.cc * test/Makefile.am * test/Makefile.in * test/NsCookieParserTest.cc * test/Sqlite3CookieParserTest.cc * test/TestUtil.cc * test/TestUtil.h * test/a2functionalTest.cc * test/chromium_cookies.sqlite * test/cookies.sqlite * test/nscookietest.txt
* 2010-09-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-09-061-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Data from remote server in HTTP/FTP download are now written to the disk(or memory) through StreamFilter. Decoding chunked and gziped streams are done cascading StreamFilter. Removed inefficient 1byte read code. * src/ChunkedDecodingStreamFilter.cc * src/ChunkedDecodingStreamFilter.h * src/DownloadCommand.cc * src/DownloadCommand.h * src/GZipDecodingStreamFilter.cc * src/GZipDecodingStreamFilter.h * src/HttpConnection.cc * src/HttpDownloadCommand.cc * src/HttpResponse.cc * src/HttpResponse.h * src/HttpResponseCommand.cc * src/HttpResponseCommand.h * src/HttpSkipResponseCommand.cc * src/HttpSkipResponseCommand.h * src/Makefile.am * src/NullSinkStreamFilter.cc * src/NullSinkStreamFilter.h * src/RequestGroup.cc * src/SinkStreamFilter.cc * src/SinkStreamFilter.h * src/StreamFilter.cc * src/StreamFilter.h * test/ChunkedDecodingStreamFilterTest.cc * test/GZipDecodingStreamFilterTest.cc * test/HttpResponseTest.cc * test/Makefile.am * test/MockSegment.h
* 2010-07-17 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-07-161-19/+26
| | | | | | | Check status values: 200 and 206. * src/HttpResponse.cc
* 2010-07-16 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-07-161-2/+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-46/+46
| | | | | | | 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-46/+46
| | | | | | | | Renamed member variables. * src/HttpResponse.cc * src/HttpResponse.h
* 2010-03-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-03-281-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added --always-resume and --max-resume-failure-tries option. If --always-resume=false is given, when all given URIs does not support resume or aria2 encounters N URIs which does not support resume (N is the value specified using --max-resume-failure-tries option), aria2 download file from scratch. The default behavior is --always-resume=true, which means if all URIs do not support resume, download fails. I think this is OK because user normally don't like to see that partially downloaded file is overwritten(this is particularly true if file size is big). This option is useful when aria2 is used as download backend and graceful falling back to overwritten behavior is preferable. Added exit status value 8, which means download failed because server did not support resume. * src/AbstractCommand.cc * src/DefaultPieceStorage.cc * src/DownloadCommand.cc * src/DownloadResultCode.h * src/FileEntry.h * src/FtpNegotiationCommand.cc * src/HttpResponse.cc * src/HttpResponseCommand.cc * src/OptionHandlerFactory.cc * src/RequestGroup.cc * src/RequestGroup.h * src/SegmentMan.cc * src/SegmentMan.h * src/prefs.cc * src/prefs.h * src/usage_text.h * test/DefaultPieceStorageTest.cc * test/SegmentManTest.cc
* 2010-03-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-03-211-6/+10
| | | | | | | | Defined cuid_t as int64_t. Removed texts containing "CUID#%D" from translatable texts because it is used in log and debugging purpose.
* 2010-03-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-03-071-1/+1
| | | | | | | | | | | | | | urldecode -> percentDecode * src/FtpConnection.cc * src/FtpNegotiationCommand.cc * src/HttpResponse.cc * src/Request.cc * src/magnet.cc * src/util.cc * src/util.h * test/UtilTest.cc
* 2010-03-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-03-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | url -> uri in Request class. * src/AbstractCommand.cc * src/AdaptiveURISelector.cc * src/DefaultBtAnnounce.cc * src/FeedbackURISelector.cc * src/FileEntry.cc * src/FileEntry.h * src/HttpRequest.h * src/HttpResponse.cc * src/InitiateConnectionCommandFactory.cc * src/Metalink2RequestGroup.cc * src/OptionHandlerImpl.h * src/ProtocolDetector.cc * src/Request.cc * src/Request.h * src/XmlRpcMethodImpl.cc * test/AuthConfigFactoryTest.cc * test/FtpConnectionTest.cc * test/HttpRequestTest.cc * test/HttpResponseTest.cc * test/RequestTest.cc
* 2010-03-01 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-02-281-2/+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-5/+2
| | | | | | | Use vector instead of deque for containers which is used for mostly read-only purpose.
* 2010-02-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-02-171-1/+1
| | | | | | | | | | | Support RFC2231 "Parameter Value Character Set and Language Information" in Content-Disposition header. * src/HttpResponse.cc * src/util.cc * src/util.h * test/UtilTest.cc