Import Upstream version 2.12

parent 872912db
2.12 version:
- Denis Denisov <denji0k@gmail.com>
Made some adjustments in README.md file.
- Joao Eriberto Mota Filho <eriberto@eriberto.pro.br>
Using distclean-local instead of clean-local to be compliant with automake
rules. https://www.gnu.org/software/automake/manual/html_node/Clean.html
- Lion Yang <lion@aosc.xyz>
Updated translation to ja.
- Mingcong Bai <jeffbai@aosc.xyz>
Updated and fixed translation to zh_CN.
- Phillip Berndt <phillip.berndt@googlemail.com>
Added a feature to extract file sizes from the Content-Range header. More
details here:
https://github.com/eribertomota/axel/commit/bcc98626791eb082c992d578fe93be72cfedef51
- Stephen Thirlwall <sdt@dr.com>
Fixed rpl_malloc not found when cross-compiling.
Help to verify and approve some pull requests.
2.11 version:
- Sjjad Hashemian <wolaws@gmail.com>
......
Version 2.12, 2016-12-25
[ Denis Denisov ]
* Made some adjustments in README.md file.
[ Joao Eriberto Mota Filho ]
* Little adjustment in Makefile.am.
[ Lion Yang ]
* Updated the translation to ja.
[ Mingcong Bai ]
* Updated and fixed translation to zh_CN.
[ Phillip Berndt ]
* Added a feature to extract file sizes from the Content-Range header. This
fix Axel downloading the file one byte short.
[ Stephen Thirlwall ]
* Fixed 'rpl_malloc not found' when cross-compiling.
* Implemented a test on SSL_new rather than OPENSSL_init_ssl to avoid a fail
to build from source.
Version 2.11, 2016-06-05
[ Sjjad Hashemian ]
......
......@@ -2,7 +2,7 @@ SUBDIRS = src po
man_MANS = man/axel.1
clean-local:
distclean-local:
-rm -rf autom4te.cache/ \
m4/
......
# AXEL
**Light command line download accelerator for Linux and Unix**
<br><br>
**1. HELP THIS PROJECT**<br>
**2. WHAT IS AXEL?**<br>
**3. BUILDING FROM SOURCE**<br>
**4. BUILDING ON OS/X WITH HOMEBREW**<br>
**5. LICENSE**<br>
#### Axel — Light command line download accelerator for Linux and Unix
1. Help this project
2. What is Axel?
3. Building from source
4. Install on macOS with Homebrew
5. Building on macOS with Homebrew
6. Related projects
7. License
--------------------
1. HELP THIS PROJECT
1. Help this project
--------------------
Axel needs your help. **If you are a programmer** and if you wants to
......@@ -27,12 +24,10 @@ packaged in Debian[2].
If you are interested to help Axel, read the [CONTRIBUTING.md](CONTRIBUTING.md) file.
[1] https://alioth.debian.org/projects/axel<br>
[2] https://packages.qa.debian.org/a/axel.html<br>
[1] https://alioth.debian.org/projects/axel
[2] https://packages.qa.debian.org/a/axel.html
----------------
2. WHAT IS AXEL?
2. What is Axel?
----------------
Axel tries to accelerate the downloading process by using multiple
......@@ -51,9 +46,7 @@ Axel was originally developed by Wilmer van der Gaast. Thanks for your
efforts. Over time, Axel got several contributions from people. Please,
see the files AUTHORS and CREDITS.
-----------------------
3. BUILDING FROM SOURCE
3. Building from source
-----------------------
Run `./autogen.sh` to create the configure script, then proceed with the
......@@ -62,14 +55,15 @@ after ./autogen.sh, is running ./configure, make and make install.
To build without SSL/TLS support, use ./configure --without-openssl
4. Install on macOS with Homebrew
------------------------------
---------------------------------
4. BUILDING ON OS/X WITH HOMEBREW
---------------------------------
brew install axel
Install the following homebrew packages:
5. Building on macOS with Homebrew
-------------------------------
`homebrew install automake gettext openssl`
Install the following homebrew packages: `brew install automake gettext openssl`
You'll need to provide some extra options to `autogen.sh` and `configure`
so they can find gettext and openssl.
......@@ -84,9 +78,16 @@ CFLAGS="-I$GETTEXT/include -I$OPENSSL/include" LDFLAGS=-L$GETTEXT/lib ./configur
You can just run `make` as usual after these steps.
6. Related projects
-------------------
----------
5. LICENSE
* [aria2](https://github.com/aria2/aria2)
* [hget](https://github.com/huydx/hget)
* [lftp](https://github.com/lavv17/lftp)
* [nugget](https://github.com/maxogden/nugget)
* [pget](https://github.com/Code-Hex/pget)
7. License
----------
Axel is under GPL-2+ with OpenSSL exception.
......@@ -4,7 +4,7 @@
# This file is under same license of Axel
AC_PREREQ([2.69])
AC_INIT([axel], [2.11], [https://github.com/eribertomota/axel/issues])
AC_INIT([axel], [2.12], [https://github.com/eribertomota/axel/issues])
AC_CONFIG_SRCDIR([src/conf.h])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
......@@ -26,9 +26,7 @@ AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h locale.h netdb.h netine
AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([gettimeofday inet_ntoa memset select setlocale socket strcasecmp strchr strrchr strstr])
AC_CHECK_FUNCS([malloc realloc gettimeofday inet_ntoa memset select setlocale socket strcasecmp strchr strrchr strstr])
# Optional (but included-by-default) openssl support
AC_ARG_WITH([openssl],
......@@ -36,7 +34,7 @@ AC_ARG_WITH([openssl],
AS_IF([test "x$with_openssl" != xno], [
AC_DEFINE([HAVE_OPENSSL], [1], [OpenSSL])
AC_SEARCH_LIBS([SSL_library_init], [ssl], [], [
AC_SEARCH_LIBS([SSL_new], [ssl], [], [
AC_MSG_ERROR([libssl not found])
])
AC_SEARCH_LIBS([ERR_get_error], [crypto], [], [
......
......@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Axel\n"
"Report-Msgid-Bugs-To: https://github.com/eribertomota/axel/issues\n"
"POT-Creation-Date: 2016-06-05 11:11-0300\n"
"POT-Creation-Date: 2016-12-25 18:59-0200\n"
"PO-Revision-Date: 2008-09-15 22:08+0200\n"
"Last-Translator: Hermann J. Beckers <hj.beckers@onlinehome.de>\n"
"Language-Team: deutsch <de@li.org>\n"
......@@ -99,7 +99,7 @@ msgstr "Fehler in %s Zeile %i.\n"
msgid "Too many redirects.\n"
msgstr "Zu viele Weiterleitungen (redirects).\n"
#: src/conn.c:390
#: src/conn.c:398
#, c-format
msgid "Unknown HTTP error.\n"
msgstr "Unbekannter HTTP-Fehler.\n"
......
......@@ -5,9 +5,9 @@ msgid ""
msgstr ""
"Project-Id-Version: Axel\n"
"Report-Msgid-Bugs-To: https://github.com/eribertomota/axel/issues\n"
"POT-Creation-Date: 2016-06-05 11:11-0300\n"
"PO-Revision-Date: 2012-03-11 00:03+0900\n"
"Last-Translator: Osamu Aoki <osamu@debian.org>\n"
"POT-Creation-Date: 2016-12-25 18:59-0200\n"
"PO-Revision-Date: 2016-08-21 01:20+0800\n"
"Last-Translator: Lion Yang <lion@aosc.xyz>\n"
"Language-Team: debian-japanese@lists.debian.org\n"
"Language: ja\n"
"MIME-Version: 1.0\n"
......@@ -20,7 +20,7 @@ msgstr "このスピードに合わせバッファーをリサイズします。
#: src/axel.c:110
msgid "Could not parse URL.\n"
msgstr "URLを解析できません。\n"
msgstr "URL を解析できません。\n"
#: src/axel.c:145
#, c-format
......@@ -102,7 +102,7 @@ msgstr "%s の %i 行目でエラー。\n"
msgid "Too many redirects.\n"
msgstr "リディレクト回数が多すぎます。\n"
#: src/conn.c:390
#: src/conn.c:398
#, c-format
msgid "Unknown HTTP error.\n"
msgstr "未知の HTTP エラー。\n"
......@@ -245,17 +245,17 @@ msgid "%i seconds"
msgstr "%i 秒"
#: src/text.c:489
#, fuzzy, c-format
#, c-format
msgid "%i:%02i minute(s)"
msgstr "%i:%02i 秒"
msgstr "%i%02i 秒"
#: src/text.c:491
#, fuzzy, c-format
#, c-format
msgid "%i:%02i:%02i hour(s)"
msgstr "%i:%02i:%02i 秒"
msgstr "%i 時 %02i 分 %02i 秒"
#: src/text.c:581
#, fuzzy, c-format
#, c-format
msgid ""
"Usage: axel [options] url1 [url2] [url...]\n"
"\n"
......@@ -284,15 +284,17 @@ msgstr ""
"-H x\tヘッダーストリングを追加\n"
"-U x\tユーザーエージェントを設定\n"
"-N\tプロキシサーバーを一切使用しなくする\n"
"-k\tSSL 証明書を検証しない\n"
"-q\t標準出力を使用しない\n"
"-v\t状態情報を増加させる\n"
"-a\t代替のプログレスインディケーター\n"
"-h\tこの情報\n"
"-V\tバージョン情報\n"
"\n"
"https://github.com/eribertomota/axel/issues にバグ報告を行なってください\n"
#: src/text.c:599
#, fuzzy, c-format
#, c-format
msgid ""
"Usage: axel [options] url1 [url2] [url...]\n"
"\n"
......@@ -321,19 +323,23 @@ msgstr ""
"--header=x\t\t-H x\tヘッダーストリングを追加\n"
"--user-agent=x\t\t-U x\tユーザーエージェントを設定\n"
"--no-proxy\t\t-N\tプロキシサーバーを一切使用しなくする\n"
"--insecure\t\t-k\tSSL 証明書を検証しない\n"
"--quiet\t\t\t-q\t標準出力を使用しない\n"
"--verbose\t\t-v\t状態情報を増加させる\n"
"--alternate\t\t-a\t代替のプログレスインディケーター\n"
"--help\t\t\t-h\tこの情報\n"
"--version\t\t-V\tバージョン情報\n"
"\n"
"https://github.com/eribertomota/axel/issues にバグ報告を行なってください\n"
#: src/text.c:621
#, fuzzy, c-format
#, c-format
msgid ""
"\n"
"Axel version %s (%s)\n"
msgstr "Axel バージョン %s (%s)\n"
msgstr ""
"\n"
"Axel バージョン %s (%s)\n"
#: src/text.c:627
#, c-format
......@@ -349,13 +355,16 @@ msgid ""
"Please, see the CREDITS file.\n"
"\n"
msgstr ""
"\n"
"CREDITS というファイルを見てみましょう\n"
"\n"
#: src/ssl.c:79
#, c-format
msgid "SSL error: %s\n"
msgstr ""
msgstr "SSL エラー: %s\n"
#: src/tcp.c:43
#, fuzzy, c-format
#, c-format
msgid "Unable to connect to server %s:%i: %s\n"
msgstr "サーバー %s:%i に接続できません\n"
msgstr "サーバー %s:%i に接続できません: %s\n"
......@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Axel\n"
"Report-Msgid-Bugs-To: https://github.com/eribertomota/axel/issues\n"
"POT-Creation-Date: 2016-06-05 11:11-0300\n"
"POT-Creation-Date: 2016-12-25 18:59-0200\n"
"PO-Revision-Date: 2001-11-14 15:22+0200\n"
"Last-Translator: Wilmer van der Gaast <wilmer@gaast.net>\n"
"Language-Team: Dutch <nl@li.org>\n"
......@@ -98,7 +98,7 @@ msgstr "Fout in %s regel %i.\n"
msgid "Too many redirects.\n"
msgstr "Te veel redirects.\n"
#: src/conn.c:390
#: src/conn.c:398
#, c-format
msgid "Unknown HTTP error.\n"
msgstr "Onbekende HTTP fout.\n"
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: axel 2.10\n"
"Report-Msgid-Bugs-To: https://github.com/eribertomota/axel/issues\n"
"POT-Creation-Date: 2016-06-05 11:11-0300\n"
"POT-Creation-Date: 2016-12-25 18:59-0200\n"
"PO-Revision-Date: 2016-06-04 18:17-0300\n"
"Last-Translator: Eriberto Mota <eriberto@eriberto.pro.br>\n"
"Language-Team: Brazilian Portuguese\n"
......@@ -103,7 +103,7 @@ msgstr "Erro em %s linha %i.\n"
msgid "Too many redirects.\n"
msgstr "Redirecionamentos excessivos.\n"
#: src/conn.c:390
#: src/conn.c:398
#, c-format
msgid "Unknown HTTP error.\n"
msgstr "Erro HTTP desconhecido.\n"
......
......@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Axel\n"
"Report-Msgid-Bugs-To: https://github.com/eribertomota/axel/issues\n"
"POT-Creation-Date: 2016-06-05 11:11-0300\n"
"POT-Creation-Date: 2016-12-25 18:59-0200\n"
"PO-Revision-Date: 2009-04-02 00:05+0200\n"
"Last-Translator: newhren <colimit@gmail.com>\n"
"Language-Team: Russian <ru@li.org>\n"
......@@ -99,7 +99,7 @@ msgstr "Ошибка в файле %s линия %i.\n"
msgid "Too many redirects.\n"
msgstr "Слишком много перенаправлений.\n"
#: src/conn.c:390
#: src/conn.c:398
#, c-format
msgid "Unknown HTTP error.\n"
msgstr "Неизвестная ошибка HTTP.\n"
......
This diff is collapsed.
......@@ -79,7 +79,7 @@
#define MAX_STRING 1024
#define MAX_ADD_HEADERS 10
#define MAX_REDIR 5
#define AXEL_VERSION_STRING "2.11"
#define AXEL_VERSION_STRING "2.12"
#define DEFAULT_USER_AGENT "Axel " AXEL_VERSION_STRING " (" ARCH ")"
typedef struct
......
......@@ -373,7 +373,15 @@ int conn_info( conn_t *conn )
}
conn->size = http_size( conn->http );
if( conn->http->status == 206 && conn->size >= 0 )
i = http_size_from_range( conn->http );
if( i > 0 && conn->size != i + 1 ) {
/* This means that the server has a bug. This version currently
uses the larger of the reported sizes, but it would be an
alternative to set supported = 0. */
conn->supported = 1;
conn->size = max(i, conn->size + 1);
}
else if( conn->http->status == 206 && conn->size >= 0 )
{
conn->supported = 1;
conn->size ++;
......
......@@ -245,6 +245,24 @@ long long int http_size( http_t *conn )
return( j );
}
long long int http_size_from_range( http_t *conn )
{
char *i;
long long int j;
if( ( i = http_header( conn, "Content-Range:" ) ) == NULL )
return( -2 );
i = strchr(i, '/');
if( i == NULL )
return( -2 );
if( sscanf( i + 1, "%lld", &j ) != 1 )
return( -3 );
return( j );
}
void http_filename( http_t *conn, char *filename )
{
char *h;
......
......@@ -62,5 +62,6 @@ int http_exec( http_t *conn );
char *http_header( http_t *conn, char *header );
void http_filename( http_t *conn, char *filename );
long long int http_size( http_t *conn );
long long int http_size_from_range( http_t *conn );
void http_encode( char *s );
void http_decode( char *s );
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment