Index: src/ne_session.c =================================================================== --- src/ne_session.c (revision 313) +++ src/ne_session.c (working copy) @@ -31,10 +31,6 @@ #include #endif -#ifdef HAVE_LIBPROXY -#include -#endif - #include "ne_session.h" #include "ne_alloc.h" #include "ne_utils.h" @@ -82,7 +78,7 @@ { struct hook *hk; - NE_DEBUG(NE_DBG_HTTP, "sess: Destroying session.\n"); + NE_DEBUG(NE_DBG_AVM, "sess: Destroying session.\n"); /* Run the destroy hooks. */ for (hk = sess->destroy_sess_hooks; hk != NULL; hk = hk->next) { @@ -158,7 +154,7 @@ { ne_session *sess = ne_calloc(sizeof *sess); - NE_DEBUG(NE_DBG_HTTP, "HTTP session to %s://%s:%d begins.\n", + NE_DEBUG(NE_DBG_AVM, "HTTP session to %s://%s:%d begins.\n", scheme, hostname, port); strcpy(sess->error, "Unknown error."); @@ -175,9 +171,9 @@ ne_inet_addr *ia; sess->ssl_context = ne_ssl_context_create(0); - sess->flags[NE_SESSFLAG_SSLv2] = 1; - - /* If the hostname parses as an IP address, don't + sess->flags[NE_SESSFLAG_SSLv2] = 0; // AVM: do not use SSLv2, because Cloudsafe + ne_ssl_context_set_flag(sess->ssl_context, NE_SSL_CTX_SSLv2, 0); // AVM: do not use SSLv2, because Cloudsafe + /* If the hostname parses as an IP address, don't * enable SNI by default. */ ia = ne_iaddr_parse(hostname, ne_iaddr_ipv4); if (ia == NULL) @@ -397,7 +393,7 @@ if (progress) { sess->progress_cb = progress; sess->progress_ud = userdata; - ne_set_notifier(sess, progress_notifier, sess); + ne_set_notifier(sess, progress_notifier, sess); // AVM warning, maybe: (ne_notify_status) progress_notifier } else { ne_set_notifier(sess, NULL, NULL); @@ -422,17 +418,19 @@ } #define UAHDR "User-Agent: " -#define AGENT " neon/" NEON_VERSION "\r\n" +//AVM Old User-Agent:...#define AGENT " neon/" NEON_VERSION "\r\n" void ne_set_useragent(ne_session *sess, const char *token) { if (sess->user_agent) ne_free(sess->user_agent); - sess->user_agent = ne_malloc(strlen(UAHDR) + strlen(AGENT) + - strlen(token) + 1); + //AVM Old User-Agent:... //sess->user_agent = ne_malloc(strlen(UAHDR) + strlen(AGENT) + strlen(token) + 1); + sess->user_agent = ne_malloc(strlen(UAHDR) + strlen(token) + 1); #ifdef HAVE_STPCPY - strcpy(stpcpy(stpcpy(sess->user_agent, UAHDR), token), AGENT); + //AVM Old User-Agent:... // strcpy(stpcpy(stpcpy(sess->user_agent, UAHDR), token), AGENT); + stpcpy(stpcpy(sess->user_agent, UAHDR), token); #else - strcat(strcat(strcpy(sess->user_agent, UAHDR), token), AGENT); + //AVM Old User-Agent:... // strcat(strcat(strcpy(sess->user_agent, UAHDR), token), AGENT); + strcat(strcpy(sess->user_agent, UAHDR), token); #endif } @@ -475,7 +473,7 @@ if (sess->connected) { struct hook *hk; - NE_DEBUG(NE_DBG_SOCKET, "sess: Closing connection.\n"); + NE_DEBUG(NE_DBG_AVM, "sess: Closing connection.\n"); if (sess->notify_cb) { sess->status.cd.hostname = sess->nexthop->hostname; @@ -491,9 +489,9 @@ ne_sock_close(sess->socket); sess->socket = NULL; - NE_DEBUG(NE_DBG_SOCKET, "sess: Connection closed.\n"); + NE_DEBUG(NE_DBG_AVM, "sess: Connection closed.\n"); } else { - NE_DEBUG(NE_DBG_SOCKET, "sess: Not closing closed connection.\n"); + NE_DEBUG(NE_DBG_AVM, "sess: Not closing closed connection.\n"); } sess->connected = 0; } Index: src/ne_session.h =================================================================== --- src/ne_session.h (revision 313) +++ src/ne_session.h (working copy) @@ -192,7 +192,7 @@ * the total size is unknown; otherwise, total gives the total * number of bytes which will be transferred. progress gives * the number of bytes transferred so far. */ - ne_off_t progress, total; + ne_off_t progress, total, current, duration; } sr; } ne_session_status_info; @@ -200,7 +200,7 @@ * 'status' argument. On invocation, the contents of exactly one of * the structures in the info union will be valid, as indicated * above. */ -typedef void (*ne_notify_status)(void *userdata, ne_session_status status, +typedef int (*ne_notify_status)(void *userdata, ne_session_status status, const ne_session_status_info *info); /* Set a status notification callback for the session, to report