From ec72008ba71615131235222fd3d8765b95e46e4f Mon Sep 17 00:00:00 2001 From: "William M. Brack" Date: Fri, 24 Aug 2007 02:57:38 +0000 Subject: [PATCH] Enhanced to include port number (if not == 80) on the "Header:" URL (bug * nanohttp.c: Enhanced to include port number (if not == 80) on the "Header:" URL (bug #469681). * xmlregexp.c: Fixed a typo causing a warning message. svn path=/trunk/; revision=3657 --- ChangeLog | 6 ++++++ nanohttp.c | 7 ++++++- xmlregexp.c | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index fa9d17b1..f36fc02b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Fri Aug 24 10:58:58 HKT 2007 William Brack + + * nanohttp.c: Enhanced to include port number (if not == 80) on the + "Header:" URL (bug #469681). + * xmlregexp.c: Fixed a typo causing a warning message. + Thu Aug 23 22:48:20 CEST 2007 Daniel Veillard * nanohttp.c: fix an open() call with creation without 3rd argument diff --git a/nanohttp.c b/nanohttp.c index e7b601a2..91c7e870 100644 --- a/nanohttp.c +++ b/nanohttp.c @@ -1364,8 +1364,13 @@ retry: if (ctxt->query != NULL) p += snprintf( p, blen - (p - bp), "?%s", ctxt->query); - p += snprintf( p, blen - (p - bp), " HTTP/1.0\r\nHost: %s\r\n", + if (ctxt->port == 80) { + p += snprintf( p, blen - (p - bp), " HTTP/1.0\r\nHost: %s\r\n", ctxt->hostname); + } else { + p += snprintf( p, blen - (p - bp), " HTTP/1.0\r\nHost: %s:%d\r\n", + ctxt->hostname, ctxt->port); + } #ifdef HAVE_ZLIB_H p += snprintf(p, blen - (p - bp), "Accept-Encoding: gzip\r\n"); diff --git a/xmlregexp.c b/xmlregexp.c index 7f8921b7..1f1a1cce 100644 --- a/xmlregexp.c +++ b/xmlregexp.c @@ -1611,9 +1611,9 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from, case, I suppose this got optimized out before when building the automata */ + copy = xmlRegCopyAtom(ctxt, atom); if (copy == NULL) return(-1); - copy = xmlRegCopyAtom(ctxt, atom); copy->quant = XML_REGEXP_QUANT_ONCE; copy->min = 0; copy->max = 0;