Commit ead3583b authored by William M. Brack's avatar William M. Brack

added space for port number (when not 80) in xmlNanoHTTPMethodRedir, plus

* nanohttp.c: added space for port number (when not 80) in
  xmlNanoHTTPMethodRedir, plus a few more comments. Should
  fix #514521.

svn path=/trunk/; revision=3685
parent 7d0ca5e8
Wed Feb 6 12:10:08 HKT 2008 William Brack <wbrack@mmm.com.hk>
* nanohttp.c: added space for port number (when not 80) in
xmlNanoHTTPMethodRedir, plus a few more comments. Should
fix #514521.
Tue Feb 5 09:41:46 CET 2008 Daniel Veillard <daniel@veillard.com>
* schemas.c: apply fix suggested by Ashwin correcting a cut-n-paste
......
......@@ -1332,13 +1332,23 @@ retry:
if (headers != NULL)
blen += strlen(headers) + 2;
if (contentType && *contentType)
/* reserve for string plus 'Content-Type: \r\n" */
blen += strlen(*contentType) + 16;
if (ctxt->query != NULL)
/* 1 for '?' */
blen += strlen(ctxt->query) + 1;
blen += strlen(method) + strlen(ctxt->path) + 24;
#ifdef HAVE_ZLIB_H
/* reserve for possible 'Accept-Encoding: gzip' string */
blen += 23;
#endif
if (ctxt->port != 80) {
/* reserve space for ':xxxxx', incl. potential proxy */
if (proxy)
blen += 12;
else
blen += 6;
}
bp = (char*)xmlMallocAtomic(blen);
if ( bp == NULL ) {
xmlNanoHTTPFreeCtxt( ctxt );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment