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

small enhancement to last fix, pointed out by Alex Cornejo

* nanohttp.c: small enhancement to last fix, pointed out
  by Alex Cornejo

svn path=/trunk/; revision=3617
parent d2f682a4
Tue May 15 22:18:08 PDT 2007 William Brack <wbrack@mmm.com.hk>
* nanohttp.c: small enhancement to last fix, pointed out
by Alex Cornejo
Tue May 15 12:38:38 PDT 2007 William Brack <wbrack@mmm.com.hk>
* nanohttp.c: fixed problem on gzip streams (bug #438045)
......
......@@ -1203,8 +1203,10 @@ xmlNanoHTTPRead(void *ctx, void *dest, int len) {
ctxt->strm->next_out = dest;
ctxt->strm->avail_out = len;
ctxt->strm->avail_in = ctxt->inptr - ctxt->inrptr;
while (ctxt->strm->avail_out > 0 && xmlNanoHTTPRecv(ctxt) > 0) {
while (ctxt->strm->avail_out > 0 &&
(ctxt->strm->avail_in > 0 || xmlNanoHTTPRecv(ctxt) > 0)) {
orig_avail_in = ctxt->strm->avail_in =
ctxt->inptr - ctxt->inrptr - bytes_read;
ctxt->strm->next_in = BAD_CAST (ctxt->inrptr + bytes_read);
......@@ -1216,7 +1218,6 @@ xmlNanoHTTPRead(void *ctx, void *dest, int len) {
}
ctxt->inrptr += bytes_read;
ctxt->strm->avail_in = ctxt->inptr - ctxt->inrptr;
return(len - ctxt->strm->avail_out);
}
#endif
......
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