From 8ddb5a7aef4df31c80a63301fe66f4e5bfc7a1d1 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Sat, 23 Sep 2000 10:28:52 +0000 Subject: [PATCH] Small bugfixes: - HTMLparser.c uri.c: Another patch from Wayne Davison, Small bugfixes: - HTMLparser.c uri.c: Another patch from Wayne Davison, correcting an URI bug and a fix for the control-character-induced infinite loop - nanohttp.c: preventive fix for compiling on WIN32 Daniel --- ChangeLog | 6 ++++++ HTMLparser.c | 2 +- nanohttp.c | 7 +------ uri.c | 6 ++---- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index cdd667f2..37e9a732 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sat Sep 23 12:19:45 CEST 2000 Daniel Veillard + + * HTMLparser.c uri.c: Another patch from Wayne Davison, correcting + an URI bug and a fix for the control-character-induced infinite loop + * nanohttp.c: preventive fix for compiling on WIN32 + Fri Sep 22 18:06:08 CEST 2000 Daniel Veillard * xmlint.c: closing bug #25000 diff --git a/HTMLparser.c b/HTMLparser.c index 9799b1bd..a0719eb6 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -4206,8 +4206,8 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { ctxt->sax->error(ctxt->userData, "detected an error in element content\n"); ctxt->wellFormed = 0; - NEXT; } + NEXT; break; } diff --git a/nanohttp.c b/nanohttp.c index 93f312eb..52a6b59d 100644 --- a/nanohttp.c +++ b/nanohttp.c @@ -67,13 +67,8 @@ #ifdef STANDALONE #define DEBUG_HTTP -#ifdef WIN32 -#define xmlStrncasecmp(a, b, n) strnicmp((char *)a, (char *)b, n) -#define xmlStrcasecmp(a, b) stricmp((char *)a, (char *)b) -#else #define xmlStrncasecmp(a, b, n) strncasecmp((char *)a, (char *)b, n) -#define xmlStrcasecmp(a, b) strcasecmp((char *)a, (char *)b) -#endif +#define xmlStrcasecmpi(a, b) strcasecmp((char *)a, (char *)b) #endif #define XML_NANO_HTTP_MAX_REDIR 10 diff --git a/uri.c b/uri.c index bc77690c..48b15063 100644 --- a/uri.c +++ b/uri.c @@ -1547,15 +1547,13 @@ xmlBuildURI(const xmlChar *URI, const xmlChar *base) { * b) The reference's path component is appended to the buffer * string. */ - if (ref->path != NULL) { + if (ref->path != NULL && ref->path[0] != 0) { index = 0; /* * Ensure the path includes a '/' */ - if ((out >0) && (res->path[out -1] != '/') && - (ref->path[0] != 0) && (ref->path[index] != '/')) { + if (out == 0) res->path[out++] = '/'; - } while (ref->path[index] != 0) { res->path[out++] = ref->path[index++]; }