version 1.256, 2000/10/30 10:32:47
|
version 1.257, 2000/11/16 11:59:06
|
Line 24
|
Line 24
|
#define AMAYA_LOST_UPDATE |
#define AMAYA_LOST_UPDATE |
|
|
#ifdef _WINDOWS |
#ifdef _WINDOWS |
# define CACHE_DIR_NAME TEXT("\\libwww-cache\\") |
#define CACHE_DIR_NAME TEXT("\\libwww-cache\\") |
#else |
#else |
# define CACHE_DIR_NAME TEXT("/libwww-cache/") |
#define CACHE_DIR_NAME TEXT("/libwww-cache/") |
#endif |
#endif |
|
|
/* libwww default parameters */ |
/* libwww default parameters */ |
Line 391 int status;
|
Line 391 int status;
|
/* libwww gives www/unknown when it gets an error. As this is |
/* libwww gives www/unknown when it gets an error. As this is |
an HTML test, we force the type to text/html */ |
an HTML test, we force the type to text/html */ |
if (!strcmp (tmp_char, "www/unknown")) |
if (!strcmp (tmp_char, "www/unknown")) |
me->http_headers.content_type = TtaWCSdup (TEXT("text/html")); |
{ |
|
/* if it's not a file downloaded from FTP, initialize the |
|
content type to text/html by default */ |
|
if (ustrncmp (me->urlName, TEXT("ftp:"), 4)) |
|
me->http_headers.content_type = TtaWCSdup (TEXT("text/html")); |
|
} |
else |
else |
{ |
{ |
iso2wc_strcpy (tmp_wchar, tmp_char); |
iso2wc_strcpy (tmp_wchar, tmp_char); |
Line 892 int status;
|
Line 897 int status;
|
/* @@ verify if this is important */ |
/* @@ verify if this is important */ |
/* @@@ new libwww doesn't need this free stream while making |
/* @@@ new libwww doesn't need this free stream while making |
a PUT. Is it the case everywhere or just for PUT? */ |
a PUT. Is it the case everywhere or just for PUT? */ |
if (me->method != METHOD_PUT && me->request->orig_output_stream != NULL) { |
if (me->method != METHOD_PUT && me->request->orig_output_stream != NULL) |
AHTFWriter_FREE (me->request->orig_output_stream); |
{ |
me->request->orig_output_stream = NULL; |
AHTFWriter_FREE (me->request->orig_output_stream); |
if (me->output != stdout) { /* Are we writing to a file? */ |
me->request->orig_output_stream = NULL; |
# ifdef DEBUG_LIBWWW |
if (me->output != stdout) { /* Are we writing to a file? */ |
|
#ifdef DEBUG_LIBWWW |
fprintf (stderr, "redirection_handler: New URL is %s, closing FILE %p\n", me->urlName, me->output); |
fprintf (stderr, "redirection_handler: New URL is %s, closing FILE %p\n", me->urlName, me->output); |
# endif |
#endif |
fclose (me->output); |
fclose (me->output); |
me->output = NULL; |
me->output = NULL; |
} |
|
} |
} |
|
} |
|
|
/* tell the user what we're doing */ |
/* tell the user what we're doing */ |
TtaSetStatus (me->docid, 1, TtaGetMessage (AMAYA, AM_RED_FETCHING), me->status_urlName); |
TtaSetStatus (me->docid, 1, TtaGetMessage (AMAYA, AM_RED_FETCHING), me->status_urlName); |
Line 1425 HTList *c;
|
Line 1431 HTList *c;
|
/* Register the default set of file suffix bindings */ |
/* Register the default set of file suffix bindings */ |
HTFileInit (); |
HTFileInit (); |
|
|
|
/* Register additional bindings */ |
|
HTBind_add("tgz", "application/gnutar", NULL, "binary", NULL, 1.0); |
|
HTBind_add("mml", "text/xml", NULL, "8bit", NULL, 1.0); |
|
HTBind_add("svg", "text/xml", NULL, "8bit", NULL, 1.0); |
|
HTBind_add("svg", "text/xml", NULL, "8bit", NULL, 1.0); |
/* Don't do any case distinction */ |
/* Don't do any case distinction */ |
HTBind_caseSensitive (FALSE); |
HTBind_caseSensitive (FALSE); |
} |
} |
Line 2225 char* AppVersion;
|
Line 2236 char* AppVersion;
|
#endif /* __STDC__ */ |
#endif /* __STDC__ */ |
{ |
{ |
CHAR_T* strptr; |
CHAR_T* strptr; |
# ifdef _I18N_ |
#ifdef _I18N_ |
unsigned char mbAppName[MAX_LENGTH], mbAppVersion[MAX_LENGTH]; |
unsigned char mbAppName[MAX_LENGTH], mbAppVersion[MAX_LENGTH]; |
# else /* !_I18N_ */ |
#else /* !_I18N_ */ |
char* mbAppName = AppName; |
char* mbAppName = AppName; |
char* mbAppVersion = AppVersion; |
char* mbAppVersion = AppVersion; |
# endif /* !_I18N_ */ |
#endif /* !_I18N_ */ |
|
|
/* If the Library is not already initialized then do it */ |
/* If the Library is not already initialized then do it */ |
if (!HTLib_isInitialized ()) { |
if (!HTLib_isInitialized ()) |
# ifdef _I18N_ |
{ |
/* Here we suppose that libwww works with multibyte character string (MBCS). |
#ifdef _I18N_ |
AppName and AppVersion are wide character strings (WCS). The following |
/* Here we suppose that libwww works with multibyte character string |
code transform each of AppName and AppVersion (WCSs) int mbAppName and |
(MBCS) AppName and AppVersion are wide character strings (WCS). |
mbAppName (MBCSs). |
The following code transforms each of AppName and |
If the libwww will support WCSs, than you have to remove the code related |
AppVersion (WCSs) int mbAppName and mbAppName (MBCSs). |
to _I18N_ (rounded by #ifdef _I18N_ #endif) and pass to HTLibInit |
If the libwww will support WCSs, than you have to remove the code |
AppName instead of mbAppName and AppVersion instead of mbAppVersion */ |
related to _I18N_ (rounded by #ifdef _I18N_ #endif) and pass |
wcstombs (mbAppName, AppName, MAX_LENGTH); |
to HTLibInit AppName instead of mbAppName and AppVersion instead |
wcstombs (mbAppVersion, AppVersion, MAX_LENGTH); |
of mbAppVersion */ |
# endif /* _I18N_ */ |
wcstombs (mbAppName, AppName, MAX_LENGTH); |
HTLibInit (mbAppName, mbAppVersion); |
wcstombs (mbAppVersion, AppVersion, MAX_LENGTH); |
} |
#endif /* _I18N_ */ |
|
HTLibInit (mbAppName, mbAppVersion); |
|
} |
|
|
if (!converters) |
if (!converters) |
converters = HTList_new (); |
converters = HTList_new (); |
Line 2288 char* AppVersion;
|
Line 2301 char* AppVersion;
|
strptr = TtaGetEnvString ("ENABLE_MDA"); |
strptr = TtaGetEnvString ("ENABLE_MDA"); |
if (!strptr || (strptr && *strptr && ustrcasecmp (strptr, TEXT("no")))) |
if (!strptr || (strptr && *strptr && ustrcasecmp (strptr, TEXT("no")))) |
HTAA_newModule ("digest", HTDigest_generate, HTDigest_parse, HTDigest_updateInfo, HTDigest_delete); |
HTAA_newModule ("digest", HTDigest_generate, HTDigest_parse, HTDigest_updateInfo, HTDigest_delete); |
|
|
/* Get any proxy settings */ |
/* Get any proxy settings */ |
ProxyInit (); |
ProxyInit (); |
|
|