1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-02-22 21:57:21 +03:00

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
This commit is contained in:
Daniel Veillard 2000-09-23 10:28:52 +00:00
parent bbe11b0880
commit 8ddb5a7aef
4 changed files with 10 additions and 11 deletions

@ -1,3 +1,9 @@
Sat Sep 23 12:19:45 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
* 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 <Daniel.Veillard@w3.org>
* xmlint.c: closing bug #25000

@ -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;
}

@ -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

6
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++];
}