mirror of
https://github.com/xroche/httrack.git
synced 2026-06-23 18:48:30 +03:00
Compare commits
1 Commits
fix/proxy-
...
3.48.12
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ee60bcc79 |
20
configure
vendored
20
configure
vendored
@@ -1,6 +1,6 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.69 for httrack 3.48.13.
|
# Generated by GNU Autoconf 2.69 for httrack 3.48.12.
|
||||||
#
|
#
|
||||||
# Report bugs to <roche+packaging@httrack.com>.
|
# Report bugs to <roche+packaging@httrack.com>.
|
||||||
#
|
#
|
||||||
@@ -616,8 +616,8 @@ MAKEFLAGS=
|
|||||||
# Identity of this package.
|
# Identity of this package.
|
||||||
PACKAGE_NAME='httrack'
|
PACKAGE_NAME='httrack'
|
||||||
PACKAGE_TARNAME='httrack'
|
PACKAGE_TARNAME='httrack'
|
||||||
PACKAGE_VERSION='3.48.13'
|
PACKAGE_VERSION='3.48.12'
|
||||||
PACKAGE_STRING='httrack 3.48.13'
|
PACKAGE_STRING='httrack 3.48.12'
|
||||||
PACKAGE_BUGREPORT='roche+packaging@httrack.com'
|
PACKAGE_BUGREPORT='roche+packaging@httrack.com'
|
||||||
PACKAGE_URL='http://www.httrack.com/'
|
PACKAGE_URL='http://www.httrack.com/'
|
||||||
|
|
||||||
@@ -1356,7 +1356,7 @@ if test "$ac_init_help" = "long"; then
|
|||||||
# Omit some internal or obsolete options to make the list less imposing.
|
# Omit some internal or obsolete options to make the list less imposing.
|
||||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||||
cat <<_ACEOF
|
cat <<_ACEOF
|
||||||
\`configure' configures httrack 3.48.13 to adapt to many kinds of systems.
|
\`configure' configures httrack 3.48.12 to adapt to many kinds of systems.
|
||||||
|
|
||||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||||
|
|
||||||
@@ -1426,7 +1426,7 @@ fi
|
|||||||
|
|
||||||
if test -n "$ac_init_help"; then
|
if test -n "$ac_init_help"; then
|
||||||
case $ac_init_help in
|
case $ac_init_help in
|
||||||
short | recursive ) echo "Configuration of httrack 3.48.13:";;
|
short | recursive ) echo "Configuration of httrack 3.48.12:";;
|
||||||
esac
|
esac
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
|
|
||||||
@@ -1537,7 +1537,7 @@ fi
|
|||||||
test -n "$ac_init_help" && exit $ac_status
|
test -n "$ac_init_help" && exit $ac_status
|
||||||
if $ac_init_version; then
|
if $ac_init_version; then
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
httrack configure 3.48.13
|
httrack configure 3.48.12
|
||||||
generated by GNU Autoconf 2.69
|
generated by GNU Autoconf 2.69
|
||||||
|
|
||||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||||
@@ -2169,7 +2169,7 @@ cat >config.log <<_ACEOF
|
|||||||
This file contains any messages produced by compilers while
|
This file contains any messages produced by compilers while
|
||||||
running configure, to aid debugging if configure makes a mistake.
|
running configure, to aid debugging if configure makes a mistake.
|
||||||
|
|
||||||
It was created by httrack $as_me 3.48.13, which was
|
It was created by httrack $as_me 3.48.12, which was
|
||||||
generated by GNU Autoconf 2.69. Invocation command line was
|
generated by GNU Autoconf 2.69. Invocation command line was
|
||||||
|
|
||||||
$ $0 $@
|
$ $0 $@
|
||||||
@@ -2990,7 +2990,7 @@ fi
|
|||||||
|
|
||||||
# Define the identity of the package.
|
# Define the identity of the package.
|
||||||
PACKAGE='httrack'
|
PACKAGE='httrack'
|
||||||
VERSION='3.48.13'
|
VERSION='3.48.12'
|
||||||
|
|
||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
@@ -13760,7 +13760,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
|||||||
# report actual input values of CONFIG_FILES etc. instead of their
|
# report actual input values of CONFIG_FILES etc. instead of their
|
||||||
# values after options handling.
|
# values after options handling.
|
||||||
ac_log="
|
ac_log="
|
||||||
This file was extended by httrack $as_me 3.48.13, which was
|
This file was extended by httrack $as_me 3.48.12, which was
|
||||||
generated by GNU Autoconf 2.69. Invocation command line was
|
generated by GNU Autoconf 2.69. Invocation command line was
|
||||||
|
|
||||||
CONFIG_FILES = $CONFIG_FILES
|
CONFIG_FILES = $CONFIG_FILES
|
||||||
@@ -13827,7 +13827,7 @@ _ACEOF
|
|||||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||||
ac_cs_version="\\
|
ac_cs_version="\\
|
||||||
httrack config.status 3.48.13
|
httrack config.status 3.48.12
|
||||||
configured by $0, generated by GNU Autoconf 2.69,
|
configured by $0, generated by GNU Autoconf 2.69,
|
||||||
with options \\"\$ac_cs_config\\"
|
with options \\"\$ac_cs_config\\"
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
AC_PREREQ(2.59)
|
AC_PREREQ(2.59)
|
||||||
|
|
||||||
AC_INIT([httrack], [3.48.13], [roche+packaging@httrack.com], [httrack], [http://www.httrack.com/])
|
AC_INIT([httrack], [3.48.12], [roche+packaging@httrack.com], [httrack], [http://www.httrack.com/])
|
||||||
AC_COPYRIGHT([
|
AC_COPYRIGHT([
|
||||||
HTTrack Website Copier, Offline Browser for Windows and Unix
|
HTTrack Website Copier, Offline Browser for Windows and Unix
|
||||||
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
Copyright (C) 1998-2014 Xavier Roche and other contributors
|
||||||
|
|||||||
7
debian/changelog
vendored
7
debian/changelog
vendored
@@ -1,10 +1,3 @@
|
|||||||
httrack (3.48.13-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* Updated to 3.48.13 (3.48-13)
|
|
||||||
closes:#750931
|
|
||||||
|
|
||||||
-- Xavier Roche <xavier@debian.org> Sun, 08 Jun 2014 16:22:13 +0200
|
|
||||||
|
|
||||||
httrack (3.48.12-1) unstable; urgency=low
|
httrack (3.48.12-1) unstable; urgency=low
|
||||||
|
|
||||||
* Updated to 3.48.12 (3.48-12)
|
* Updated to 3.48.12 (3.48-12)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
.\" Process this file with
|
.\" Process this file with
|
||||||
.\" groff -man -Tascii httrack.1
|
.\" groff -man -Tascii httrack.1
|
||||||
.\"
|
.\"
|
||||||
.TH httrack 1 "08 June 2014" "httrack website copier"
|
.TH httrack 1 "06 June 2014" "httrack website copier"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
httrack \- offline browser : copy websites to a local directory
|
httrack \- offline browser : copy websites to a local directory
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|||||||
@@ -59,10 +59,6 @@ Please visit our Website: http://www.httrack.com
|
|||||||
#define INVALID_SOCKET -1
|
#define INVALID_SOCKET -1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if HTS_USEOPENSSL
|
#if HTS_USEOPENSSL
|
||||||
/*
|
/*
|
||||||
OpensSSL crypto routines by Eric Young (eay@cryptsoft.com)
|
OpensSSL crypto routines by Eric Young (eay@cryptsoft.com)
|
||||||
@@ -158,8 +154,4 @@ typedef enum HTTrackStatus {
|
|||||||
STATUS_FTP_READY = 1001
|
STATUS_FTP_READY = 1001
|
||||||
} HTTrackStatus;
|
} HTTrackStatus;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -129,6 +129,29 @@ typedef struct filecreate_params filecreate_params;
|
|||||||
|
|
||||||
#include "hts-indextmpl.h"
|
#include "hts-indextmpl.h"
|
||||||
|
|
||||||
|
// structure d'un lien
|
||||||
|
#ifndef HTS_DEF_FWSTRUCT_lien_url
|
||||||
|
#define HTS_DEF_FWSTRUCT_lien_url
|
||||||
|
typedef struct lien_url lien_url;
|
||||||
|
#endif
|
||||||
|
struct lien_url {
|
||||||
|
char *adr; // adresse
|
||||||
|
char *fil; // nom du fichier distant
|
||||||
|
char *sav; // nom à sauver sur disque (avec chemin éventuel)
|
||||||
|
char *cod; // chemin codebase éventuel si classe java
|
||||||
|
char *former_adr; // adresse initiale (avant éventuel moved), peut être nulle
|
||||||
|
char *former_fil; // nom du fichier distant initial (avant éventuel moved), peut être nul
|
||||||
|
|
||||||
|
int premier; // pointeur sur le premier lien qui a donné lieu aux autres liens du domaine
|
||||||
|
int precedent; // pointeur sur le lien qui a donné lieu à ce lien précis
|
||||||
|
int depth; // profondeur autorisée lien ; >0 forte 0=faible
|
||||||
|
int pass2; // traiter après les autres, seconde passe. si == -1, lien traité en background
|
||||||
|
char link_import; // lien importé à la suite d'un moved - ne pas appliquer les règles classiques up/down
|
||||||
|
//int moved; // pointeur sur moved
|
||||||
|
int retry; // nombre de retry restants
|
||||||
|
int testmode; // mode test uniquement, envoyer juste un head!
|
||||||
|
};
|
||||||
|
|
||||||
// adr, fil
|
// adr, fil
|
||||||
#ifndef HTS_DEF_FWSTRUCT_lien_adrfil
|
#ifndef HTS_DEF_FWSTRUCT_lien_adrfil
|
||||||
#define HTS_DEF_FWSTRUCT_lien_adrfil
|
#define HTS_DEF_FWSTRUCT_lien_adrfil
|
||||||
@@ -149,6 +172,57 @@ struct lien_adrfilsave {
|
|||||||
char save[HTS_URLMAXSIZE * 2]; // nom à sauver sur disque (avec chemin éventuel)
|
char save[HTS_URLMAXSIZE * 2]; // nom à sauver sur disque (avec chemin éventuel)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// chargement de fichiers en 'arrière plan'
|
||||||
|
#ifndef HTS_DEF_FWSTRUCT_lien_back
|
||||||
|
#define HTS_DEF_FWSTRUCT_lien_back
|
||||||
|
typedef struct lien_back lien_back;
|
||||||
|
#endif
|
||||||
|
struct lien_back {
|
||||||
|
#if DEBUG_CHECKINT
|
||||||
|
char magic;
|
||||||
|
#endif
|
||||||
|
char url_adr[HTS_URLMAXSIZE * 2]; // adresse
|
||||||
|
char url_fil[HTS_URLMAXSIZE * 2]; // nom du fichier distant
|
||||||
|
char url_sav[HTS_URLMAXSIZE * 2]; // nom à sauver sur disque (avec chemin éventuel)
|
||||||
|
char referer_adr[HTS_URLMAXSIZE * 2]; // adresse host page referer
|
||||||
|
char referer_fil[HTS_URLMAXSIZE * 2]; // fichier page referer
|
||||||
|
char location_buffer[HTS_URLMAXSIZE * 2]; // "location" en cas de "moved" (302,..)
|
||||||
|
char *tmpfile; // nom à sauver temporairement (compressé)
|
||||||
|
char tmpfile_buffer[HTS_URLMAXSIZE * 2]; // buffer pour le nom à sauver temporairement
|
||||||
|
char send_too[1024]; // données à envoyer en même temps que le header
|
||||||
|
int status; // status (-1=non utilisé, 0: prêt, >0: opération en cours)
|
||||||
|
int locked; // locked (to be used soon)
|
||||||
|
int testmode; // mode de test
|
||||||
|
int timeout; // gérer des timeouts? (!=0 : nombre de secondes)
|
||||||
|
TStamp timeout_refresh; // si oui, time refresh
|
||||||
|
int rateout; // timeout refresh? (!=0 : taux minimum toléré en octets/s)
|
||||||
|
TStamp rateout_time; // si oui, date de départ
|
||||||
|
LLint maxfile_nonhtml; // taille max d'un fichier non html
|
||||||
|
LLint maxfile_html; // idem pour un ficheir html
|
||||||
|
htsblk r; // structure htsblk de chaque objet en background
|
||||||
|
int is_update; // mode update
|
||||||
|
int head_request; // requète HEAD?
|
||||||
|
LLint range_req_size; // range utilisé
|
||||||
|
TStamp ka_time_start; // refresh time for KA
|
||||||
|
//
|
||||||
|
int http11; // L'en tête doit être signé HTTP/1.1 et non HTTP/1.0
|
||||||
|
int is_chunk; // chunk?
|
||||||
|
char *chunk_adr; // adresse chunk en cours de chargement
|
||||||
|
LLint chunk_size; // taille chunk en cours de chargement
|
||||||
|
LLint chunk_blocksize; // taille data declaree par le chunk
|
||||||
|
LLint compressed_size; // taille compressés (stats uniquement)
|
||||||
|
//
|
||||||
|
//int links_index; // to access liens[links_index]
|
||||||
|
//
|
||||||
|
char info[256]; // éventuel status pour le ftp
|
||||||
|
int stop_ftp; // flag stop pour ftp
|
||||||
|
int finalized; // finalized (optim memory)
|
||||||
|
int early_add; // was added before link heap saw it
|
||||||
|
#if DEBUG_CHECKINT
|
||||||
|
char magic2;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
#ifndef HTS_DEF_FWSTRUCT_struct_back
|
#ifndef HTS_DEF_FWSTRUCT_struct_back
|
||||||
#define HTS_DEF_FWSTRUCT_struct_back
|
#define HTS_DEF_FWSTRUCT_struct_back
|
||||||
typedef struct struct_back struct_back;
|
typedef struct struct_back struct_back;
|
||||||
|
|||||||
@@ -231,16 +231,8 @@ struct t_hts_callback_ref {
|
|||||||
size_t offset;
|
size_t offset;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern const t_hts_htmlcheck_callbacks default_callbacks;
|
extern const t_hts_htmlcheck_callbacks default_callbacks;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define HT_PRINT(A) strcatbuff(opt->state.HTbuff,A);
|
#define HT_PRINT(A) strcatbuff(opt->state.HTbuff,A);
|
||||||
#define HT_REQUEST_START opt->state.HTbuff[0]='\0';
|
#define HT_REQUEST_START opt->state.HTbuff[0]='\0';
|
||||||
#define HT_REQUEST_END
|
#define HT_REQUEST_END
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ Please visit our Website: http://www.httrack.com
|
|||||||
#define HTTRACK_GLOBAL_DEFH
|
#define HTTRACK_GLOBAL_DEFH
|
||||||
|
|
||||||
// Version (also check external version information)
|
// Version (also check external version information)
|
||||||
#define HTTRACK_VERSION "3.48-13"
|
#define HTTRACK_VERSION "3.48-12"
|
||||||
#define HTTRACK_VERSIONID "3.48.13"
|
#define HTTRACK_VERSIONID "3.48.12"
|
||||||
#define HTTRACK_AFF_VERSION "3.x"
|
#define HTTRACK_AFF_VERSION "3.x"
|
||||||
#define HTTRACK_LIB_VERSION "2.0"
|
#define HTTRACK_LIB_VERSION "2.0"
|
||||||
|
|
||||||
|
|||||||
@@ -173,10 +173,6 @@ struct struct_inthash_enum {
|
|||||||
/* Library internal definictions */
|
/* Library internal definictions */
|
||||||
#ifdef HTS_INTERNAL_BYTECODE
|
#ifdef HTS_INTERNAL_BYTECODE
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new hashtable, with initial bucket size of 'size'.
|
* Create a new hashtable, with initial bucket size of 'size'.
|
||||||
* If size is 0, use the default minimal bucket size.
|
* If size is 0, use the default minimal bucket size.
|
||||||
@@ -381,10 +377,6 @@ inthash_keys inthash_hash_value(const char *value);
|
|||||||
void inthash_set_global_assert_handler(t_inthash_loghandler log,
|
void inthash_set_global_assert_handler(t_inthash_loghandler log,
|
||||||
t_inthash_asserthandler fatal);
|
t_inthash_asserthandler fatal);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -5501,10 +5501,6 @@ HTSEXT_API httrackp *hts_create_opt(void) {
|
|||||||
return opt;
|
return opt;
|
||||||
}
|
}
|
||||||
|
|
||||||
HTSEXT_API size_t hts_sizeof_opt(void) {
|
|
||||||
return sizeof(httrackp);
|
|
||||||
}
|
|
||||||
|
|
||||||
HTSEXT_API void hts_free_opt(httrackp * opt) {
|
HTSEXT_API void hts_free_opt(httrackp * opt) {
|
||||||
if (opt != NULL) {
|
if (opt != NULL) {
|
||||||
|
|
||||||
|
|||||||
80
src/htslib.h
80
src/htslib.h
@@ -105,6 +105,86 @@ MSVC2003INLINEBUG HTS_STATIC char *getHtsOptBuff_(httrackp * opt) {
|
|||||||
#define OPT_GET_BUFF(OPT) ( getHtsOptBuff_(OPT) )
|
#define OPT_GET_BUFF(OPT) ( getHtsOptBuff_(OPT) )
|
||||||
#define OPT_GET_BUFF_SIZE(OPT) ( sizeof(opt->state.concat.buff[0]) )
|
#define OPT_GET_BUFF_SIZE(OPT) ( sizeof(opt->state.concat.buff[0]) )
|
||||||
|
|
||||||
|
// structure pour paramètres supplémentaires lors de la requête
|
||||||
|
#ifndef HTS_DEF_FWSTRUCT_htsrequest_proxy
|
||||||
|
#define HTS_DEF_FWSTRUCT_htsrequest_proxy
|
||||||
|
typedef struct htsrequest_proxy htsrequest_proxy;
|
||||||
|
#endif
|
||||||
|
struct htsrequest_proxy {
|
||||||
|
int active;
|
||||||
|
const char* name;
|
||||||
|
int port;
|
||||||
|
const char* bindhost; // bind this host
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifndef HTS_DEF_FWSTRUCT_htsrequest
|
||||||
|
#define HTS_DEF_FWSTRUCT_htsrequest
|
||||||
|
typedef struct htsrequest htsrequest;
|
||||||
|
#endif
|
||||||
|
struct htsrequest {
|
||||||
|
short int user_agent_send; // user agent (ex: httrack/1.0 [sun])
|
||||||
|
short int http11; // l'en tête peut (doit) être signé HTTP/1.1 et non HTTP/1.0
|
||||||
|
short int nokeepalive; // pas de keep-alive
|
||||||
|
short int range_used; // Range utilisé
|
||||||
|
short int nocompression; // Pas de compression
|
||||||
|
short int flush_garbage; // recycled
|
||||||
|
const char* user_agent;
|
||||||
|
const char* referer;
|
||||||
|
const char* from;
|
||||||
|
const char* lang_iso;
|
||||||
|
const char* accept;
|
||||||
|
const char* headers;
|
||||||
|
htsrequest_proxy proxy; // proxy
|
||||||
|
};
|
||||||
|
|
||||||
|
// structure pour retour d'une connexion/prise d'en tête
|
||||||
|
#ifndef HTS_DEF_FWSTRUCT_htsblk
|
||||||
|
#define HTS_DEF_FWSTRUCT_htsblk
|
||||||
|
typedef struct htsblk htsblk;
|
||||||
|
#endif
|
||||||
|
struct htsblk {
|
||||||
|
int statuscode; // status-code, -1=erreur, 200=OK,201=..etc (cf RFC1945)
|
||||||
|
short int notmodified; // page ou fichier NON modifié (transféré)
|
||||||
|
short int is_write; // sortie sur disque (out) ou en mémoire (adr)
|
||||||
|
short int is_chunk; // mode chunk
|
||||||
|
short int compressed; // compressé?
|
||||||
|
short int empty; // vide?
|
||||||
|
short int keep_alive; // Keep-Alive?
|
||||||
|
short int keep_alive_trailers; // ..with trailers extension
|
||||||
|
int keep_alive_t; // KA timeout
|
||||||
|
int keep_alive_max; // KA number of requests
|
||||||
|
char *adr; // adresse du bloc de mémoire, NULL=vide
|
||||||
|
char *headers; // adresse des en têtes si présents
|
||||||
|
FILE *out; // écriture directe sur disque (si is_write=1)
|
||||||
|
LLint size; // taille fichier
|
||||||
|
char msg[80]; // message éventuel si échec ("\0"=non précisé)
|
||||||
|
char contenttype[64]; // content-type ("text/html" par exemple)
|
||||||
|
char charset[64]; // charset ("iso-8859-1" par exemple)
|
||||||
|
char contentencoding[64]; // content-encoding ("gzip" par exemple)
|
||||||
|
char *location; // on copie dedans éventuellement la véritable 'location'
|
||||||
|
LLint totalsize; // taille totale à télécharger (-1=inconnue)
|
||||||
|
short int is_file; // ce n'est pas une socket mais un descripteur de fichier si 1
|
||||||
|
T_SOC soc; // ID socket
|
||||||
|
SOCaddr address; // IP address
|
||||||
|
int address_size; // IP address structure length (unused internally)
|
||||||
|
FILE *fp; // fichier pour file://
|
||||||
|
#if HTS_USEOPENSSL
|
||||||
|
short int ssl; // is this connection a SSL one? (https)
|
||||||
|
// BIO* ssl_soc; // SSL structure
|
||||||
|
SSL *ssl_con; // connection structure
|
||||||
|
#endif
|
||||||
|
char lastmodified[64]; // Last-Modified
|
||||||
|
char etag[256]; // Etag
|
||||||
|
char cdispo[256]; // Content-Disposition coupé
|
||||||
|
LLint crange; // Content-Range
|
||||||
|
LLint crange_start; // Content-Range
|
||||||
|
LLint crange_end; // Content-Range
|
||||||
|
int debugid; // debug connection
|
||||||
|
/* */
|
||||||
|
htsrequest req; // paramètres pour la requête
|
||||||
|
/*char digest[32+2]; // digest md5 généré par le moteur ("" si non généré) */
|
||||||
|
};
|
||||||
|
|
||||||
/* ANCIENNE STURCTURE pour cache 1.0 */
|
/* ANCIENNE STURCTURE pour cache 1.0 */
|
||||||
#ifndef HTS_DEF_FWSTRUCT_OLD_t_proxy
|
#ifndef HTS_DEF_FWSTRUCT_OLD_t_proxy
|
||||||
#define HTS_DEF_FWSTRUCT_OLD_t_proxy
|
#define HTS_DEF_FWSTRUCT_OLD_t_proxy
|
||||||
|
|||||||
@@ -115,10 +115,6 @@ struct htsmoduleStruct {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Used to wrap module initialization */
|
/* Used to wrap module initialization */
|
||||||
/* return 1 if init was ok */
|
/* return 1 if init was ok */
|
||||||
typedef int (*t_htsWrapperInit) (char *fn, char *args);
|
typedef int (*t_htsWrapperInit) (char *fn, char *args);
|
||||||
@@ -137,8 +133,4 @@ extern int hts_parse_externals(htsmoduleStruct * str);
|
|||||||
extern int V6_is_available;
|
extern int V6_is_available;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -74,10 +74,6 @@ typedef unsigned long in_addr_t;
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Ipv4 structures */
|
/* Ipv4 structures */
|
||||||
#if HTS_INET6 != 0
|
#if HTS_INET6 != 0
|
||||||
typedef struct in6_addr INaddr;
|
typedef struct in6_addr INaddr;
|
||||||
@@ -257,8 +253,4 @@ static HTS_UNUSED void SOCaddr_inetntoa_(char *namebuf, size_t namebuflen,
|
|||||||
/* Socket length type */
|
/* Socket length type */
|
||||||
typedef socklen_t SOClen;
|
typedef socklen_t SOClen;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
164
src/htsopt.h
164
src/htsopt.h
@@ -35,13 +35,7 @@ Please visit our Website: http://www.httrack.com
|
|||||||
#define HTTRACK_DEFOPT
|
#define HTTRACK_DEFOPT
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "htsglobal.h"
|
#include "htsglobal.h"
|
||||||
#include "htsnet.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Forward definitions */
|
/* Forward definitions */
|
||||||
#ifndef HTS_DEF_FWSTRUCT_t_hts_htmlcheck_callbacks
|
#ifndef HTS_DEF_FWSTRUCT_t_hts_htmlcheck_callbacks
|
||||||
@@ -445,162 +439,4 @@ struct hts_stat_struct {
|
|||||||
TStamp last_request; // last request issued
|
TStamp last_request; // last request issued
|
||||||
};
|
};
|
||||||
|
|
||||||
// structure pour paramètres supplémentaires lors de la requête
|
|
||||||
#ifndef HTS_DEF_FWSTRUCT_htsrequest_proxy
|
|
||||||
#define HTS_DEF_FWSTRUCT_htsrequest_proxy
|
|
||||||
typedef struct htsrequest_proxy htsrequest_proxy;
|
|
||||||
#endif
|
|
||||||
struct htsrequest_proxy {
|
|
||||||
int active;
|
|
||||||
const char* name;
|
|
||||||
int port;
|
|
||||||
const char* bindhost; // bind this host
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifndef HTS_DEF_FWSTRUCT_htsrequest
|
|
||||||
#define HTS_DEF_FWSTRUCT_htsrequest
|
|
||||||
typedef struct htsrequest htsrequest;
|
|
||||||
#endif
|
|
||||||
struct htsrequest {
|
|
||||||
short int user_agent_send; // user agent (ex: httrack/1.0 [sun])
|
|
||||||
short int http11; // l'en tête peut (doit) être signé HTTP/1.1 et non HTTP/1.0
|
|
||||||
short int nokeepalive; // pas de keep-alive
|
|
||||||
short int range_used; // Range utilisé
|
|
||||||
short int nocompression; // Pas de compression
|
|
||||||
short int flush_garbage; // recycled
|
|
||||||
const char* user_agent;
|
|
||||||
const char* referer;
|
|
||||||
const char* from;
|
|
||||||
const char* lang_iso;
|
|
||||||
const char* accept;
|
|
||||||
const char* headers;
|
|
||||||
htsrequest_proxy proxy; // proxy
|
|
||||||
};
|
|
||||||
|
|
||||||
// structure pour retour d'une connexion/prise d'en tête
|
|
||||||
#ifndef HTS_DEF_FWSTRUCT_htsblk
|
|
||||||
#define HTS_DEF_FWSTRUCT_htsblk
|
|
||||||
typedef struct htsblk htsblk;
|
|
||||||
#endif
|
|
||||||
struct htsblk {
|
|
||||||
int statuscode; // status-code, -1=erreur, 200=OK,201=..etc (cf RFC1945)
|
|
||||||
short int notmodified; // page ou fichier NON modifié (transféré)
|
|
||||||
short int is_write; // sortie sur disque (out) ou en mémoire (adr)
|
|
||||||
short int is_chunk; // mode chunk
|
|
||||||
short int compressed; // compressé?
|
|
||||||
short int empty; // vide?
|
|
||||||
short int keep_alive; // Keep-Alive?
|
|
||||||
short int keep_alive_trailers; // ..with trailers extension
|
|
||||||
int keep_alive_t; // KA timeout
|
|
||||||
int keep_alive_max; // KA number of requests
|
|
||||||
char *adr; // adresse du bloc de mémoire, NULL=vide
|
|
||||||
char *headers; // adresse des en têtes si présents
|
|
||||||
FILE *out; // écriture directe sur disque (si is_write=1)
|
|
||||||
LLint size; // taille fichier
|
|
||||||
char msg[80]; // message éventuel si échec ("\0"=non précisé)
|
|
||||||
char contenttype[64]; // content-type ("text/html" par exemple)
|
|
||||||
char charset[64]; // charset ("iso-8859-1" par exemple)
|
|
||||||
char contentencoding[64]; // content-encoding ("gzip" par exemple)
|
|
||||||
char *location; // on copie dedans éventuellement la véritable 'location'
|
|
||||||
LLint totalsize; // taille totale à télécharger (-1=inconnue)
|
|
||||||
short int is_file; // ce n'est pas une socket mais un descripteur de fichier si 1
|
|
||||||
T_SOC soc; // ID socket
|
|
||||||
SOCaddr address; // IP address
|
|
||||||
int address_size; // IP address structure length (unused internally)
|
|
||||||
FILE *fp; // fichier pour file://
|
|
||||||
#if HTS_USEOPENSSL
|
|
||||||
short int ssl; // is this connection a SSL one? (https)
|
|
||||||
// BIO* ssl_soc; // SSL structure
|
|
||||||
SSL *ssl_con; // connection structure
|
|
||||||
#endif
|
|
||||||
char lastmodified[64]; // Last-Modified
|
|
||||||
char etag[256]; // Etag
|
|
||||||
char cdispo[256]; // Content-Disposition coupé
|
|
||||||
LLint crange; // Content-Range
|
|
||||||
LLint crange_start; // Content-Range
|
|
||||||
LLint crange_end; // Content-Range
|
|
||||||
int debugid; // debug connection
|
|
||||||
/* */
|
|
||||||
htsrequest req; // paramètres pour la requête
|
|
||||||
/*char digest[32+2]; // digest md5 généré par le moteur ("" si non généré) */
|
|
||||||
};
|
|
||||||
|
|
||||||
// structure d'un lien
|
|
||||||
#ifndef HTS_DEF_FWSTRUCT_lien_url
|
|
||||||
#define HTS_DEF_FWSTRUCT_lien_url
|
|
||||||
typedef struct lien_url lien_url;
|
|
||||||
#endif
|
|
||||||
struct lien_url {
|
|
||||||
char *adr; // adresse
|
|
||||||
char *fil; // nom du fichier distant
|
|
||||||
char *sav; // nom à sauver sur disque (avec chemin éventuel)
|
|
||||||
char *cod; // chemin codebase éventuel si classe java
|
|
||||||
char *former_adr; // adresse initiale (avant éventuel moved), peut être nulle
|
|
||||||
char *former_fil; // nom du fichier distant initial (avant éventuel moved), peut être nul
|
|
||||||
|
|
||||||
int premier; // pointeur sur le premier lien qui a donné lieu aux autres liens du domaine
|
|
||||||
int precedent; // pointeur sur le lien qui a donné lieu à ce lien précis
|
|
||||||
int depth; // profondeur autorisée lien ; >0 forte 0=faible
|
|
||||||
int pass2; // traiter après les autres, seconde passe. si == -1, lien traité en background
|
|
||||||
char link_import; // lien importé à la suite d'un moved - ne pas appliquer les règles classiques up/down
|
|
||||||
//int moved; // pointeur sur moved
|
|
||||||
int retry; // nombre de retry restants
|
|
||||||
int testmode; // mode test uniquement, envoyer juste un head!
|
|
||||||
};
|
|
||||||
|
|
||||||
// chargement de fichiers en 'arrière plan'
|
|
||||||
#ifndef HTS_DEF_FWSTRUCT_lien_back
|
|
||||||
#define HTS_DEF_FWSTRUCT_lien_back
|
|
||||||
typedef struct lien_back lien_back;
|
|
||||||
#endif
|
|
||||||
struct lien_back {
|
|
||||||
#if DEBUG_CHECKINT
|
|
||||||
char magic;
|
|
||||||
#endif
|
|
||||||
char url_adr[HTS_URLMAXSIZE * 2]; // adresse
|
|
||||||
char url_fil[HTS_URLMAXSIZE * 2]; // nom du fichier distant
|
|
||||||
char url_sav[HTS_URLMAXSIZE * 2]; // nom à sauver sur disque (avec chemin éventuel)
|
|
||||||
char referer_adr[HTS_URLMAXSIZE * 2]; // adresse host page referer
|
|
||||||
char referer_fil[HTS_URLMAXSIZE * 2]; // fichier page referer
|
|
||||||
char location_buffer[HTS_URLMAXSIZE * 2]; // "location" en cas de "moved" (302,..)
|
|
||||||
char *tmpfile; // nom à sauver temporairement (compressé)
|
|
||||||
char tmpfile_buffer[HTS_URLMAXSIZE * 2]; // buffer pour le nom à sauver temporairement
|
|
||||||
char send_too[1024]; // données à envoyer en même temps que le header
|
|
||||||
int status; // status (-1=non utilisé, 0: prêt, >0: opération en cours)
|
|
||||||
int locked; // locked (to be used soon)
|
|
||||||
int testmode; // mode de test
|
|
||||||
int timeout; // gérer des timeouts? (!=0 : nombre de secondes)
|
|
||||||
TStamp timeout_refresh; // si oui, time refresh
|
|
||||||
int rateout; // timeout refresh? (!=0 : taux minimum toléré en octets/s)
|
|
||||||
TStamp rateout_time; // si oui, date de départ
|
|
||||||
LLint maxfile_nonhtml; // taille max d'un fichier non html
|
|
||||||
LLint maxfile_html; // idem pour un ficheir html
|
|
||||||
htsblk r; // structure htsblk de chaque objet en background
|
|
||||||
int is_update; // mode update
|
|
||||||
int head_request; // requète HEAD?
|
|
||||||
LLint range_req_size; // range utilisé
|
|
||||||
TStamp ka_time_start; // refresh time for KA
|
|
||||||
//
|
|
||||||
int http11; // L'en tête doit être signé HTTP/1.1 et non HTTP/1.0
|
|
||||||
int is_chunk; // chunk?
|
|
||||||
char *chunk_adr; // adresse chunk en cours de chargement
|
|
||||||
LLint chunk_size; // taille chunk en cours de chargement
|
|
||||||
LLint chunk_blocksize; // taille data declaree par le chunk
|
|
||||||
LLint compressed_size; // taille compressés (stats uniquement)
|
|
||||||
//
|
|
||||||
//int links_index; // to access liens[links_index]
|
|
||||||
//
|
|
||||||
char info[256]; // éventuel status pour le ftp
|
|
||||||
int stop_ftp; // flag stop pour ftp
|
|
||||||
int finalized; // finalized (optim memory)
|
|
||||||
int early_add; // was added before link heap saw it
|
|
||||||
#if DEBUG_CHECKINT
|
|
||||||
char magic2;
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -33,6 +33,10 @@ Please visit our Website: http://www.httrack.com
|
|||||||
#ifndef HTSSAFE_DEFH
|
#ifndef HTSSAFE_DEFH
|
||||||
#define HTSSAFE_DEFH
|
#define HTSSAFE_DEFH
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -49,13 +53,7 @@ Please visit our Website: http://www.httrack.com
|
|||||||
#ifndef HTS_DEF_FWSTRUCT_htsErrorCallback
|
#ifndef HTS_DEF_FWSTRUCT_htsErrorCallback
|
||||||
#define HTS_DEF_FWSTRUCT_htsErrorCallback
|
#define HTS_DEF_FWSTRUCT_htsErrorCallback
|
||||||
typedef void (*htsErrorCallback) (const char *msg, const char *file, int line);
|
typedef void (*htsErrorCallback) (const char *msg, const char *file, int line);
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
HTSEXT_API htsErrorCallback hts_get_error_callback(void);
|
HTSEXT_API htsErrorCallback hts_get_error_callback(void);
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define HTSSAFE_ABORT_FUNCTION(A,B,C) do { \
|
#define HTSSAFE_ABORT_FUNCTION(A,B,C) do { \
|
||||||
@@ -209,4 +207,8 @@ static HTS_INLINE HTS_UNUSED char* strcpy_safe_(char *const dest, const size_t s
|
|||||||
#define realloct(A,B) realloc(A, B)
|
#define realloct(A,B) realloc(A, B)
|
||||||
#define memcpybuff(A, B, N) memcpy((A), (B), (N))
|
#define memcpybuff(A, B, N) memcpy((A), (B), (N))
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -178,14 +178,6 @@ int main(int argc, char *argv[]) {
|
|||||||
}
|
}
|
||||||
smallserver_setkey("HTTRACK_WEB", HTTRACK_WEB);
|
smallserver_setkey("HTTRACK_WEB", HTTRACK_WEB);
|
||||||
|
|
||||||
/* Check version compatibility */
|
|
||||||
if (hts_sizeof_opt() != sizeof(httrackp)) {
|
|
||||||
fprintf(stderr,
|
|
||||||
"** CRITICAL: incompatible current httrack library version %s, expected version %s",
|
|
||||||
hts_version(), HTTRACK_VERSIONID);
|
|
||||||
smallserver_setkey("HTTRACK_INCOMPATIBLE_VERSIONID", hts_version());
|
|
||||||
}
|
|
||||||
|
|
||||||
/* protected session-id */
|
/* protected session-id */
|
||||||
{
|
{
|
||||||
char buff[1024];
|
char buff[1024];
|
||||||
|
|||||||
@@ -46,17 +46,9 @@ Please visit our Website: http://www.httrack.com
|
|||||||
typedef struct httrackp httrackp;
|
typedef struct httrackp httrackp;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
HTSEXT_API int htswrap_init(void); // LEGACY
|
HTSEXT_API int htswrap_init(void); // LEGACY
|
||||||
HTSEXT_API int htswrap_free(void); // LEGACY
|
HTSEXT_API int htswrap_free(void); // LEGACY
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//HTSEXT_API int htswrap_add(httrackp * opt, const char *name, void *fct);
|
//HTSEXT_API int htswrap_add(httrackp * opt, const char *name, void *fct);
|
||||||
//HTSEXT_API uintptr_t htswrap_read(httrackp * opt, const char *name);
|
//HTSEXT_API uintptr_t htswrap_read(httrackp * opt, const char *name);
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Copyright (C) 1998-2014 Xavier Roche and other contributors
|
|||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
as published by the Free Software Foundation; either version 2
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
@@ -118,7 +118,6 @@ HTSEXT_API int hts_main2(int argc, char **argv, httrackp * opt);
|
|||||||
/* Options handling */
|
/* Options handling */
|
||||||
HTSEXT_API httrackp *hts_create_opt(void);
|
HTSEXT_API httrackp *hts_create_opt(void);
|
||||||
HTSEXT_API void hts_free_opt(httrackp * opt);
|
HTSEXT_API void hts_free_opt(httrackp * opt);
|
||||||
HTSEXT_API size_t hts_sizeof_opt(void);
|
|
||||||
HTSEXT_API const hts_stat_struct* hts_get_stats(httrackp * opt);
|
HTSEXT_API const hts_stat_struct* hts_get_stats(httrackp * opt);
|
||||||
HTSEXT_API void set_wrappers(httrackp * opt); /* LEGACY */
|
HTSEXT_API void set_wrappers(httrackp * opt); /* LEGACY */
|
||||||
HTSEXT_API int plug_wrapper(httrackp * opt, const char *moduleName,
|
HTSEXT_API int plug_wrapper(httrackp * opt, const char *moduleName,
|
||||||
|
|||||||
@@ -223,15 +223,6 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
signal_handlers();
|
signal_handlers();
|
||||||
hts_init();
|
hts_init();
|
||||||
|
|
||||||
// Check version compatibility
|
|
||||||
if (hts_sizeof_opt() != sizeof(httrackp)) {
|
|
||||||
fprintf(stderr,
|
|
||||||
"incompatible current httrack library version %s, expected version %s",
|
|
||||||
hts_version(), HTTRACK_VERSIONID);
|
|
||||||
abortLog("incompatible httrack library version, please update both httrack and its library");
|
|
||||||
}
|
|
||||||
|
|
||||||
opt = global_opt = hts_create_opt();
|
opt = global_opt = hts_create_opt();
|
||||||
assert(opt->size_httrackp == sizeof(httrackp));
|
assert(opt->size_httrackp == sizeof(httrackp));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user