Skip to content

Commit

Permalink
Merge branch 'aria2:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
wenbingzhang authored Feb 4, 2024
2 parents 61a7677 + a8cb271 commit 36f77fb
Show file tree
Hide file tree
Showing 21 changed files with 30 additions and 29 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- name: Linux setup
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install \
g++-12 \
clang-15 \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.android
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ ENV LIBEXPAT_VERSION=2.5.0
ENV LIBEXPAT_ARCHIVE=expat-$LIBEXPAT_VERSION.tar.bz2
ENV LIBEXPAT_URI=https://github.com/libexpat/libexpat/releases/download/R_2_5_0/$LIBEXPAT_ARCHIVE

ENV ZLIB_VERSION=1.3
ENV ZLIB_VERSION=1.3.1
ENV ZLIB_ARCHIVE=zlib-$ZLIB_VERSION.tar.gz
ENV ZLIB_URI=https://zlib.net/$ZLIB_ARCHIVE
ENV ZLIB_URI=https://github.com/madler/zlib/releases/download/v1.3.1/$ZLIB_ARCHIVE

ENV CARES_VERSION=1.21.0
ENV CARES_ARCHIVE=c-ares-$CARES_VERSION.tar.gz
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.mingw
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN apt-get update && \
RUN curl -L -O https://gmplib.org/download/gmp/gmp-6.3.0.tar.xz && \
curl -L -O https://github.com/libexpat/libexpat/releases/download/R_2_5_0/expat-2.5.0.tar.bz2 && \
curl -L -O https://www.sqlite.org/2023/sqlite-autoconf-3430100.tar.gz && \
curl -L -O https://www.zlib.net/zlib-1.3.tar.gz && \
curl -L -O https://github.com/madler/zlib/releases/download/v1.3.1/zlib-1.3.1.tar.gz && \
curl -L -O https://c-ares.org/download/c-ares-1.19.1.tar.gz && \
curl -L -O https://libssh2.org/download/libssh2-1.11.0.tar.bz2

Expand Down Expand Up @@ -68,8 +68,8 @@ RUN tar xf sqlite-autoconf-3430100.tar.gz && \
--build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` && \
make -j$(nproc) install

RUN tar xf zlib-1.3.tar.gz && \
cd zlib-1.3 && \
RUN tar xf zlib-1.3.1.tar.gz && \
cd zlib-1.3.1 && \
CC=$HOST-gcc \
AR=$HOST-ar \
LD=$HOST-ld \
Expand Down
2 changes: 1 addition & 1 deletion README.android
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The following libraries were statically linked.

* openssl 1.1.1k
* expat 2.4.1
* zlib 1.2.11
* zlib 1.3.1
* c-ares 1.17.2
* libssh2 1.9.0

Expand Down
2 changes: 1 addition & 1 deletion README.mingw
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ necessary. The linked libraries are:
* gmp 6.3.0
* expat 2.5.0
* sqlite 3.43.1
* zlib 1.3
* zlib 1.3.1
* c-ares 1.19.1
* libssh2 1.11.0

Expand Down
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ case "$host" in
# available from <time.h> even without (un)helpful interference
# from <pthread.h>, and also defines __USE_MINGW_ANSI_STDIO.
EXTRACPPFLAGS="$EXTRACPPFLAGS -D_POSIX_C_SOURCE=1"
# Build with ASLR (dynamicbase) and NX compatiblity (nxcompat)
# Build with ASLR (dynamicbase) and NX compatibility (nxcompat)
# Enable pie once upstream/binutils gets fixed to produce correct
# binaries with it.
EXTRALDFLAGS="$EXTRALDFLAGS -Wl,--dynamicbase -Wl,--nxcompat"
Expand Down Expand Up @@ -737,7 +737,7 @@ fi

# Checks for library functions.
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.18])
AM_GNU_GETTEXT_VERSION([0.19])
AC_FUNC_ERROR_AT_LINE
AC_PROG_GCC_TRADITIONAL

Expand All @@ -749,7 +749,7 @@ AC_FUNC_STRFTIME
AC_FUNC_VPRINTF
AC_FUNC_FORK
AC_FUNC_STRTOD
# Don't use AC_FUNC_MMAP becaue it fails on some platforms (e.g.,
# Don't use AC_FUNC_MMAP because it fails on some platforms (e.g.,
# OpenWRT) which have mmap and it works in the way we use in aria2.
# Instead use mmap in AC_CHECK_FUNCS list.
AC_CHECK_FUNCS([__argz_count \
Expand Down
2 changes: 1 addition & 1 deletion src/AbstractHttpServerResponseCommand.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ bool AbstractHttpServerResponseCommand::execute()
else {
if (timeoutTimer_.difference(global::wallclock()) >= 30_s) {
A2_LOG_INFO(fmt("CUID#%" PRId64
" - HttpServer: Timeout while trasmitting response.",
" - HttpServer: Timeout while transmitting response.",
getCuid()));
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/HttpResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class HttpResponse {

/**
* Returns filename.
* If content-disposition header is privided in response header,
* If content-disposition header is provided in response header,
* this function returns the filename from it.
* If it is not there, returns the part of filename from the request URL.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/LogFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class LogFactory {
static void setLogLevel(Logger::LEVEL level);

/**
* Set log level to output to file by string represention of log
* Set log level to output to file by string representation of log
* level. Possible values are: debug, info, notice, warn, error
*/
static void setLogLevel(const std::string& level);
Expand All @@ -95,7 +95,7 @@ class LogFactory {
static void setConsoleLogLevel(Logger::LEVEL level);

/**
* Set log level to output to console by string represention of log
* Set log level to output to console by string representation of log
* level. Possible values are: debug, info, notice, warn, error
*/
static void setConsoleLogLevel(const std::string& level);
Expand Down
2 changes: 1 addition & 1 deletion src/NameResolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class NameResolver {
NameResolver();

/**
* Reolved addresses are pushed into addresses.
* Resolved addresses are pushed into addresses.
*/
void resolve(std::vector<std::string>& resolvedAddresses,
const std::string& hostname);
Expand Down
2 changes: 1 addition & 1 deletion src/PortEventPoll.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void PortEventPoll::poll(const struct timeval& tv)
int res;
uint_t nget = 1;
// If port_getn was interrupted by signal, it can consume events but
// not updat nget!. For this very annoying bug, we have to check
// not update nget!. For this very annoying bug, we have to check
// actually event is filled or not.
portEvents_[0].portev_user = (void*)-1;
res = port_getn(port_, portEvents_, portEventsSize_, &nget, &timeout);
Expand Down
2 changes: 1 addition & 1 deletion src/ServerStat.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class ServerStat {
// This method doesn't update _lastUpdate.
void setStatus(STATUS status);

// status should be one of the followings: "OK", "ERROR".
// status should be one of the following: "OK", "ERROR".
// Giving other string will not change the status of this object.
// This method doesn't update _lastUpdate.
void setStatus(const std::string& status);
Expand Down
2 changes: 1 addition & 1 deletion src/WinTLSSession.cc
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ ssize_t WinTLSSession::readData(void* data, size_t len)

// Can be filled from decBuffer entirely?
if (decBuf_.size() >= len) {
A2_LOG_DEBUG("WinTLS: Fullfilling req from buffer");
A2_LOG_DEBUG("WinTLS: Fulfilling req from buffer");
memcpy(data, decBuf_.data(), len);
decBuf_.eat(len);
return len;
Expand Down
2 changes: 1 addition & 1 deletion src/getaddrinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ static int is_address(s) const char* s;
}

/*
* Calcurate length of the string `s', where `s' is set by
* Calculate length of the string `s', where `s' is set by
* sprintf(s, "%d", n).
*/
static int itoa_length(n)
Expand Down
2 changes: 1 addition & 1 deletion src/usage_text.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
#define TEXT_PROXY_METHOD \
_(" --proxy-method=METHOD Set the method to use in proxy request.")
#define TEXT_REFERER \
_(" --referer=REFERER Set an http referrrer (Referer). This affects\n" \
_(" --referer=REFERER Set an http referrer (Referer). This affects\n" \
" all http/https downloads. If \"*\" is given,\n" \
" the download URI is also used as the referrer.\n" \
" This may be useful when used together with\n" \
Expand Down
2 changes: 1 addition & 1 deletion test/AllTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ int main(int argc, char* argv[])

// By default, SocketCore uses AF_UNSPEC for getaddrinfo hints to
// resolve address. Sometime SocketCore::bind() and
// SocketCore::establishConnection() use difference protocl family
// SocketCore::establishConnection() use difference protocol family
// and latter cannot connect to former. To avoid this situation, we
// limit protocol family to AF_INET for unit tests.
aria2::SocketCore::setProtocolFamily(AF_INET);
Expand Down
4 changes: 2 additions & 2 deletions test/FileTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void FileTest::testMkdir()
CPPUNIT_ASSERT(d.mkdirs());

CPPUNIT_ASSERT(d.exists());
// this test failes because d.mkdir returns false when the directory is
// this test fails because d.mkdir returns false when the directory is
// already exists.
CPPUNIT_ASSERT(!d.mkdirs());
}
Expand All @@ -147,7 +147,7 @@ void FileTest::testMkdir()
CPPUNIT_ASSERT(d.mkdirs());

CPPUNIT_ASSERT(nd.exists());
// this test failes because d.mkdir returns false when the directory is
// this test fails because d.mkdir returns false when the directory is
// already exists.
CPPUNIT_ASSERT(!d.mkdirs());
}
Expand Down
4 changes: 2 additions & 2 deletions test/RequestTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void RequestTest::testSetUri2()

CPPUNIT_ASSERT(v);

// referer is unchaged
// referer is unchanged
CPPUNIT_ASSERT_EQUAL(std::string("http://aria.rednoah.com:8080"),
req.getReferer());
CPPUNIT_ASSERT_EQUAL(std::string("http"), req.getProtocol());
Expand Down Expand Up @@ -124,7 +124,7 @@ void RequestTest::testRedirectUri()
// See redirect count is incremented.
CPPUNIT_ASSERT_EQUAL(2, req.getRedirectCount());

// Give abosulute path
// Give absolute path
CPPUNIT_ASSERT(req.redirectUri("/abspath/to/file"));
CPPUNIT_ASSERT_EQUAL(std::string("http://aria.rednoah.co.jp/abspath/to/file"),
req.getCurrentUri());
Expand Down
4 changes: 2 additions & 2 deletions test/RpcMethodTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -875,15 +875,15 @@ void RpcMethodTest::testTellWaiting()
CPPUNIT_ASSERT_EQUAL(0, res.code);
resParams = downcast<List>(res.param);
CPPUNIT_ASSERT_EQUAL((size_t)4, resParams->size());
// nagative offset and normalized offset < 0
// negative offset and normalized offset < 0
req = RpcRequest(TellWaitingRpcMethod::getMethodName(), List::g());
req.params->append(Integer::g(-5));
req.params->append(Integer::g(100));
res = m.execute(std::move(req), e_.get());
CPPUNIT_ASSERT_EQUAL(0, res.code);
resParams = downcast<List>(res.param);
CPPUNIT_ASSERT_EQUAL((size_t)0, resParams->size());
// nagative offset and normalized offset == 0
// negative offset and normalized offset == 0
req = RpcRequest(TellWaitingRpcMethod::getMethodName(), List::g());
req.params->append(Integer::g(-4));
req.params->append(Integer::g(100));
Expand Down
2 changes: 1 addition & 1 deletion test/SocketCoreTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ void SocketCoreTest::testVerifyHostname()
CPPUNIT_ASSERT(net::verifyHostname("::1", dnsNames, ipAddrs, commonName));
}
{
// If iPAddress is privided, don't match with commonName
// If iPAddress is provided, don't match with commonName
std::vector<std::string> dnsNames, ipAddrs;
unsigned char binAddr[16];
size_t len;
Expand Down
2 changes: 1 addition & 1 deletion test/UriSplitTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void UriSplitTest::testUriSplit()

// According to RFC 3986, @ in userinfo is illegal. But many people
// have e-mail account as username and don't understand
// percent-encoding and keep getting erros putting it in URI in
// percent-encoding and keep getting errors putting it in URI in
// unecoded form. Because of this, we support @ in username.
uri = "http://[email protected]:[email protected]/path/";
memset(&res, 0, sizeof(res));
Expand Down

0 comments on commit 36f77fb

Please sign in to comment.