summaryrefslogtreecommitdiff
path: root/src/util.h
Commit message (Collapse)AuthorAgeFilesLines
* Allow subsecond value in ns cookie.txt file's expiry time fieldTatsuhiro Tsujikawa2016-05-151-0/+4
|
* mingw: Defer the falloc warning until falloc is specified by optionTatsuhiro Tsujikawa2016-04-181-0/+4
|
* Don't inherit file descriptor to child processTatsuhiro Tsujikawa2016-02-081-0/+5
| | | | | | For non-Mingw32 build, set FD_CLOEXEC to file descriptors which live beyond function scope. For Mingw32 build, just pass false to bInheritHandles parameter of CreateProcessW.
* mingw: Add formatLastError as wrapper function for FormatMessageTatsuhiro Tsujikawa2016-01-281-0/+7
|
* Refactor HttpRequestTatsuhiro Tsujikawa2016-01-101-0/+1
| | | | | This also makes comparison performed when replacing builtin header field with user-defined one case-insensitive.
* Refactor SocketCore::getPeerInfo, getAddrInfo to return Endpoint objectTatsuhiro Tsujikawa2016-01-091-2/+1
|
* make clang-format using clang-format-3.6Tatsuhiro Tsujikawa2015-12-271-233/+198
|
* Remove unused macros defined in util.hTatsuhiro Tsujikawa2015-06-211-8/+0
|
* Use std::make_sharedTatsuhiro Tsujikawa2015-06-111-1/+1
|
* Make config and cache files conform to XDGVasilij Schneidermann2015-06-021-0/+7
| | | | | | | See http://standards.freedesktop.org/basedir-spec/latest/ for further details. This implementation decides the default based on whether a file exists at the legacy location, if it doesn't, it picks the XDG-conforming location instead.
* Mingw: Use _wgetenv to get user's home directoryTatsuhiro Tsujikawa2015-02-211-0/+3
| | | | Fixes GH-342
* Fix compile error without SSL/TLS enabledTatsuhiro Tsujikawa2015-02-011-0/+2
|
* Add --min-tls-version optionTatsuhiro Tsujikawa2014-12-061-0/+6
| | | | | The --min-tls-version option specifies minimum SSL/TLS version to enable. Possible Values: SSLv3, TLSv1, TLSv1.1, TLSv1.2 Default: TLSv1
* util::parseIntSegments: Return SegList<int>Tatsuhiro Tsujikawa2014-06-041-1/+1
|
* Support PREF_DIR change for Metalink filesTatsuhiro Tsujikawa2014-06-041-0/+2
| | | | | Reworked previous commit adeead6f0396e2f8551d1182972e277728fd6c8b, and now support changing PREF_DIR for Metalink downloads.
* Internally use HMAC in http authNils Maier2014-05-221-5/+11
| | | | | | To at least get constant time compare. Also fix incorrect parsing of the creds (were incorrectly stripped). Also add unit tests.
* Remove nativeToUtf8 and utf8ToNativeTatsuhiro Tsujikawa2013-11-011-4/+0
| | | | | They are now not needed since we use Windows specific command-line argument converter.
* Include prefs.h instead of typedef PrefPtr everywhereTatsuhiro Tsujikawa2013-09-261-2/+1
|
* Introduce PrefPtr typedefNils Maier2013-09-191-2/+3
|
* Fix util::nextParam when compiled with recent Apple clangNils Maier2013-08-201-2/+2
|
* Define a type for signal handlersNils Maier2013-08-181-2/+3
|
* Rewrite util::divideTatsuhiro Tsujikawa2013-06-251-11/+6
|
* toUpper, toLower: Let compiler copy srcTatsuhiro Tsujikawa2013-06-241-2/+2
|
* Require -std=c++11 and use std::shared_ptr instead of SharedHandleTatsuhiro Tsujikawa2013-06-221-6/+6
|
* uitos: Fix off-by-one error bugTatsuhiro Tsujikawa2013-04-291-1/+1
|
* Set sa_mask when setting signal handlerTatsuhiro Tsujikawa2013-02-141-1/+6
|
* Rewritten util::uitos()Tatsuhiro Tsujikawa2013-01-161-16/+19
|
* Made return type of util::parse_content_disposition ssize_tTatsuhiro Tsujikawa2012-11-011-3/+3
|
* Content-Disposition parser conforming to RFC 6266.Tatsuhiro Tsujikawa2012-10-271-1/+30
| | | | RFC 2231 Continuation is not supported.
* Removed unused functionsTatsuhiro Tsujikawa2012-09-271-16/+0
|
* Use nothrow version of parseInt, parseUInt and parseLLIntTatsuhiro Tsujikawa2012-09-271-3/+0
|
* Made DEFAULT_STRIP_CHARSET const char[]Tatsuhiro Tsujikawa2012-09-241-13/+9
|
* Store only interesting HTTP headers in HttpHeaderTatsuhiro Tsujikawa2012-09-231-0/+3
| | | | | | 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 DownloadHandlerConstantsTatsuhiro Tsujikawa2012-09-221-3/+3
| | | | | | | | | | DownloadHandlerConstants was simplified. MIME type handling in Accept header was also reworked. DownloadContext's metalinkServerContacted_ is replaced with acceptMetalink_ and its boolean value is reverted. RequestGroup and HttpRequest now do not hold vector of accepting types. HttpRequest has the flag acceptMetalink_ which will be set by the same value of DownloadContext::accpetMetalink_ and if it is true, Metalink MIME types are added to Accept header field.
* Use int64_t instead of off_tTatsuhiro Tsujikawa2012-06-251-1/+1
| | | | | Some classes such as DiskAdaptor, DiskWriter, FileAllocationIterator and ChecksumValidator are left unchanged.
* Rewritten HTTP header parserTatsuhiro Tsujikawa2012-06-231-0/+4
|
* Don't use locale dependent toupper and tolower.Tatsuhiro Tsujikawa2012-03-311-0/+4
|
* Rewritten TLS hostname check based on RFC 6125.Tatsuhiro Tsujikawa2012-03-301-16/+1
|
* Added hostname check described in RFC 2818 with OpenSSL.Tatsuhiro Tsujikawa2012-03-281-0/+18
|
* Fixed clang warning and errors.Tatsuhiro Tsujikawa2012-03-011-47/+47
| | | | | | Test for the zero-length array with A2_ARRAY_LEN was commented out since it is only used in unit test code and clang and old gcc 3.4.3 emit error.
* Check scheme part in redirected URI more strictly.Tatsuhiro Tsujikawa2012-02-151-0/+2
| | | | | | | The previous implementation mistakenly sees '/abspath?uri=http://foo' as an absolute URI because it contains '://', but actually it is not. This change checks scheme part is constructed in the allowed character set described in RFC 3986 Section 3.1.
* Avoid strlen in util::streq, util::strieq, util::startsWith and ↵Tatsuhiro Tsujikawa2012-01-111-4/+26
| | | | util::istartsWith
* Use short form of util::startsWith and util::endsWithTatsuhiro Tsujikawa2012-01-111-0/+1
|
* Removed static const char[] as much as possible.Tatsuhiro Tsujikawa2012-01-111-7/+41
| | | | | Provided convenient functions for streq, strieq, startsWith, istartsWith, endsWith, iendsWith to support this move.
* Fixed compile error on android (which does not LFS support)Tatsuhiro Tsujikawa2011-12-261-1/+1
|
* Use int instead of unsigned int where unsigned int is not needed.Tatsuhiro Tsujikawa2011-12-091-1/+1
|
* Replaced uint64_t with off_t or int64_t.Tatsuhiro Tsujikawa2011-12-091-5/+1
| | | | | 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-165/+10
|
* HttpHeader::fill() now stores header name in lowercase.Tatsuhiro Tsujikawa2011-11-111-0/+10
| | | | | Find methods in HttpHeader won't lowercase argument, so use lowercase letters to get HTTP header field.