version 1.386, 2009/05/06 12:30:19
|
version 1.387, 2009/07/21 13:44:05
|
Line 1846 static void AHTProtocolInit (voi
|
Line 1846 static void AHTProtocolInit (voi
|
HTTP_setConnectionMode (HTTP_11_NO_PIPELINING); |
HTTP_setConnectionMode (HTTP_11_NO_PIPELINING); |
} |
} |
|
|
|
#ifdef SSL |
|
/*---------------------------------------------------------------------- |
|
AHTHTTPSInit |
|
SSL initialization |
|
----------------------------------------------------------------------*/ |
|
static void AHTHTTPSInit (void) |
|
{ |
|
/* Set the SSL protocol method. By default, it is the highest available |
|
protocol. Setting it up to SSL_V23 allows the client to negotiate |
|
with the server and set up either TSLv1, SSLv3 or SSLv2 */ |
|
HTSSL_protMethod_set (HTSSL_V23); |
|
|
|
/* Set the certificate verification depth to 2 in order to be able to |
|
validate self signed certificates */ |
|
HTSSL_verifyDepth_set (2); |
|
|
|
/* Register SSL stuff for handling ssl access */ |
|
// HTSSLhttps_init(YES); |
|
HTSSLhttps_init(NO); |
|
} |
|
#endif /* SSL */ |
|
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
AHTNetInit |
AHTNetInit |
Reegisters "before" and "after" request filters. |
Reegisters "before" and "after" request filters. |
Line 1861 static void AHTNetInit (void)
|
Line 1883 static void AHTNetInit (void)
|
|
|
HTNet_addBefore (HTCredentialsFilter, "http://*", NULL, HT_FILTER_LATE); |
HTNet_addBefore (HTCredentialsFilter, "http://*", NULL, HT_FILTER_LATE); |
HTNet_addBefore (HTProxyFilter, NULL, NULL, HT_FILTER_LATE); |
HTNet_addBefore (HTProxyFilter, NULL, NULL, HT_FILTER_LATE); |
|
#ifdef SSL |
|
HTNet_addBefore (HTPEP_beforeFilter, "http://*", NULL, HT_FILTER_LATE); |
|
#endif /* SSL */ |
HTHost_setActivateRequestCallback (AHTOpen_file); |
HTHost_setActivateRequestCallback (AHTOpen_file); |
|
|
/* register AFTER filters |
/* register AFTER filters |
Line 1872 static void AHTNetInit (void)
|
Line 1897 static void AHTNetInit (void)
|
|
|
HTNet_addAfter (HTAuthFilter, "http://*", NULL, HT_NO_ACCESS, HT_FILTER_MIDDLE); |
HTNet_addAfter (HTAuthFilter, "http://*", NULL, HT_NO_ACCESS, HT_FILTER_MIDDLE); |
HTNet_addAfter (HTAuthFilter, "http://*", NULL, HT_REAUTH, HT_FILTER_MIDDLE); |
HTNet_addAfter (HTAuthFilter, "http://*", NULL, HT_REAUTH, HT_FILTER_MIDDLE); |
|
#ifdef SSL |
|
HTNet_addAfter (HTPEP_afterFilter, "http://*", NULL, HT_ALL, HT_FILTER_MIDDLE); |
|
#endif /* SSL */ |
HTNet_addAfter (redirection_handler, "http://*", NULL, HT_PERM_REDIRECT, HT_FILTER_MIDDLE); |
HTNet_addAfter (redirection_handler, "http://*", NULL, HT_PERM_REDIRECT, HT_FILTER_MIDDLE); |
HTNet_addAfter (redirection_handler, "http://*", NULL, HT_FOUND, HT_FILTER_MIDDLE); |
HTNet_addAfter (redirection_handler, "http://*", NULL, HT_FOUND, HT_FILTER_MIDDLE); |
HTNet_addAfter (redirection_handler, "http://*", NULL, HT_SEE_OTHER, HT_FILTER_MIDDLE); |
HTNet_addAfter (redirection_handler, "http://*", NULL, HT_SEE_OTHER, HT_FILTER_MIDDLE); |
Line 1882 static void AHTNetInit (void)
|
Line 1910 static void AHTNetInit (void)
|
HTNet_addAfter (precondition_handler, NULL, NULL, HT_PRECONDITION_FAILED, HT_FILTER_MIDDLE); |
HTNet_addAfter (precondition_handler, NULL, NULL, HT_PRECONDITION_FAILED, HT_FILTER_MIDDLE); |
#endif /* AMAYA_LOST_UPDATE */ |
#endif /* AMAYA_LOST_UPDATE */ |
|
|
|
#ifdef SSL |
|
/* A rajouter ?? */ |
|
//HTNet_addAfter (HTAuthInfoFilter, "https://*", NULL, HT_ALL, HT_FILTER_MIDDLE); |
|
#endif /* SSL */ |
|
|
#if defined(_GTK) || defined(_WX) |
#if defined(_GTK) || defined(_WX) |
HTNet_addAfter (AHTLoadTerminate_handler, NULL, NULL, HT_ALL, HT_FILTER_LAST); |
HTNet_addAfter (AHTLoadTerminate_handler, NULL, NULL, HT_ALL, HT_FILTER_LAST); |
#endif /* defined(_GTK) || defined(_WX) */ |
#endif /* defined(_GTK) || defined(_WX) */ |
Line 2316 static void AHTProfile_newAmaya (const c
|
Line 2349 static void AHTProfile_newAmaya (const c
|
ptr = TtaGetEnvString ("ENABLE_MDA"); |
ptr = TtaGetEnvString ("ENABLE_MDA"); |
if (!ptr || (ptr && *ptr && strcasecmp (ptr, "no"))) |
if (!ptr || (ptr && *ptr && strcasecmp (ptr, "no"))) |
HTAA_newModule ("digest", HTDigest_generate, HTDigest_parse, HTDigest_updateInfo, HTDigest_delete); |
HTAA_newModule ("digest", HTDigest_generate, HTDigest_parse, HTDigest_updateInfo, HTDigest_delete); |
|
|
|
#ifdef SSL |
|
/* SSL initialization */ |
|
AHTHTTPSInit (); |
|
#endif /* SSL */ |
|
|
/* Get any proxy settings */ |
/* Get any proxy settings */ |
ProxyInit (); |
ProxyInit (); |
Line 2637 void QueryClose ()
|
Line 2675 void QueryClose ()
|
HTNoProxy_deleteAll (); |
HTNoProxy_deleteAll (); |
SafePut_delete (); |
SafePut_delete (); |
HTGateway_deleteAll (); |
HTGateway_deleteAll (); |
|
|
|
#ifdef SSL |
|
/* Close down SSL */ |
|
HTSSLhttps_terminate(); |
|
#endif /* SSL */ |
|
|
AHTProfile_delete (); |
AHTProfile_delete (); |
|
|
/* close the trace file (if it exists) */ |
/* close the trace file (if it exists) */ |