Lines Matching refs:ctxt
284 xmlNanoHTTPScanURL(xmlNanoHTTPCtxtPtr ctxt, const char *URL) { in xmlNanoHTTPScanURL() argument
291 if (ctxt->protocol != NULL) { in xmlNanoHTTPScanURL()
292 xmlFree(ctxt->protocol); in xmlNanoHTTPScanURL()
293 ctxt->protocol = NULL; in xmlNanoHTTPScanURL()
295 if (ctxt->hostname != NULL) { in xmlNanoHTTPScanURL()
296 xmlFree(ctxt->hostname); in xmlNanoHTTPScanURL()
297 ctxt->hostname = NULL; in xmlNanoHTTPScanURL()
299 if (ctxt->path != NULL) { in xmlNanoHTTPScanURL()
300 xmlFree(ctxt->path); in xmlNanoHTTPScanURL()
301 ctxt->path = NULL; in xmlNanoHTTPScanURL()
303 if (ctxt->query != NULL) { in xmlNanoHTTPScanURL()
304 xmlFree(ctxt->query); in xmlNanoHTTPScanURL()
305 ctxt->query = NULL; in xmlNanoHTTPScanURL()
318 ctxt->protocol = xmlMemStrdup(uri->scheme); in xmlNanoHTTPScanURL()
323 ctxt->hostname = (char *) xmlCharStrndup(uri->server + 1, len -2); in xmlNanoHTTPScanURL()
325 ctxt->hostname = xmlMemStrdup(uri->server); in xmlNanoHTTPScanURL()
327 ctxt->hostname = xmlMemStrdup(uri->server); in xmlNanoHTTPScanURL()
329 ctxt->path = xmlMemStrdup(uri->path); in xmlNanoHTTPScanURL()
331 ctxt->path = xmlMemStrdup("/"); in xmlNanoHTTPScanURL()
333 ctxt->query = xmlMemStrdup(uri->query); in xmlNanoHTTPScanURL()
335 ctxt->port = uri->port; in xmlNanoHTTPScanURL()
424 xmlNanoHTTPFreeCtxt(xmlNanoHTTPCtxtPtr ctxt) { in xmlNanoHTTPFreeCtxt() argument
425 if (ctxt == NULL) return; in xmlNanoHTTPFreeCtxt()
426 if (ctxt->hostname != NULL) xmlFree(ctxt->hostname); in xmlNanoHTTPFreeCtxt()
427 if (ctxt->protocol != NULL) xmlFree(ctxt->protocol); in xmlNanoHTTPFreeCtxt()
428 if (ctxt->path != NULL) xmlFree(ctxt->path); in xmlNanoHTTPFreeCtxt()
429 if (ctxt->query != NULL) xmlFree(ctxt->query); in xmlNanoHTTPFreeCtxt()
430 if (ctxt->out != NULL) xmlFree(ctxt->out); in xmlNanoHTTPFreeCtxt()
431 if (ctxt->in != NULL) xmlFree(ctxt->in); in xmlNanoHTTPFreeCtxt()
432 if (ctxt->contentType != NULL) xmlFree(ctxt->contentType); in xmlNanoHTTPFreeCtxt()
433 if (ctxt->encoding != NULL) xmlFree(ctxt->encoding); in xmlNanoHTTPFreeCtxt()
434 if (ctxt->mimeType != NULL) xmlFree(ctxt->mimeType); in xmlNanoHTTPFreeCtxt()
435 if (ctxt->location != NULL) xmlFree(ctxt->location); in xmlNanoHTTPFreeCtxt()
436 if (ctxt->authHeader != NULL) xmlFree(ctxt->authHeader); in xmlNanoHTTPFreeCtxt()
438 if (ctxt->strm != NULL) { in xmlNanoHTTPFreeCtxt()
439 inflateEnd(ctxt->strm); in xmlNanoHTTPFreeCtxt()
440 xmlFree(ctxt->strm); in xmlNanoHTTPFreeCtxt()
444 ctxt->state = XML_NANO_HTTP_NONE; in xmlNanoHTTPFreeCtxt()
445 if (ctxt->fd != INVALID_SOCKET) closesocket(ctxt->fd); in xmlNanoHTTPFreeCtxt()
446 ctxt->fd = INVALID_SOCKET; in xmlNanoHTTPFreeCtxt()
447 xmlFree(ctxt); in xmlNanoHTTPFreeCtxt()
459 xmlNanoHTTPSend(xmlNanoHTTPCtxtPtr ctxt, const char *xmt_ptr, int outlen) in xmlNanoHTTPSend() argument
469 if ((ctxt->state & XML_NANO_HTTP_WRITE) && (xmt_ptr != NULL)) { in xmlNanoHTTPSend()
471 int nsent = send(ctxt->fd, SEND_ARG2_CAST (xmt_ptr + total_sent), in xmlNanoHTTPSend()
494 if (ctxt->fd > FD_SETSIZE) in xmlNanoHTTPSend()
505 FD_SET(ctxt->fd, &wfd); in xmlNanoHTTPSend()
509 (void) select(ctxt->fd + 1, NULL, &wfd, NULL, &tv); in xmlNanoHTTPSend()
511 p.fd = ctxt->fd; in xmlNanoHTTPSend()
533 xmlNanoHTTPRecv(xmlNanoHTTPCtxtPtr ctxt) in xmlNanoHTTPRecv() argument
543 while (ctxt->state & XML_NANO_HTTP_READ) { in xmlNanoHTTPRecv()
544 if (ctxt->in == NULL) { in xmlNanoHTTPRecv()
545 ctxt->in = (char *) xmlMallocAtomic(65000 * sizeof(char)); in xmlNanoHTTPRecv()
546 if (ctxt->in == NULL) { in xmlNanoHTTPRecv()
548 ctxt->last = -1; in xmlNanoHTTPRecv()
551 ctxt->inlen = 65000; in xmlNanoHTTPRecv()
552 ctxt->inptr = ctxt->content = ctxt->inrptr = ctxt->in; in xmlNanoHTTPRecv()
554 if (ctxt->inrptr > ctxt->in + XML_NANO_HTTP_CHUNK) { in xmlNanoHTTPRecv()
555 int delta = ctxt->inrptr - ctxt->in; in xmlNanoHTTPRecv()
556 int len = ctxt->inptr - ctxt->inrptr; in xmlNanoHTTPRecv()
558 memmove(ctxt->in, ctxt->inrptr, len); in xmlNanoHTTPRecv()
559 ctxt->inrptr -= delta; in xmlNanoHTTPRecv()
560 ctxt->content -= delta; in xmlNanoHTTPRecv()
561 ctxt->inptr -= delta; in xmlNanoHTTPRecv()
563 if ((ctxt->in + ctxt->inlen) < (ctxt->inptr + XML_NANO_HTTP_CHUNK)) { in xmlNanoHTTPRecv()
564 int d_inptr = ctxt->inptr - ctxt->in; in xmlNanoHTTPRecv()
565 int d_content = ctxt->content - ctxt->in; in xmlNanoHTTPRecv()
566 int d_inrptr = ctxt->inrptr - ctxt->in; in xmlNanoHTTPRecv()
567 char *tmp_ptr = ctxt->in; in xmlNanoHTTPRecv()
569 ctxt->inlen *= 2; in xmlNanoHTTPRecv()
570 ctxt->in = (char *) xmlRealloc(tmp_ptr, ctxt->inlen); in xmlNanoHTTPRecv()
571 if (ctxt->in == NULL) { in xmlNanoHTTPRecv()
574 ctxt->last = -1; in xmlNanoHTTPRecv()
577 ctxt->inptr = ctxt->in + d_inptr; in xmlNanoHTTPRecv()
578 ctxt->content = ctxt->in + d_content; in xmlNanoHTTPRecv()
579 ctxt->inrptr = ctxt->in + d_inrptr; in xmlNanoHTTPRecv()
581 ctxt->last = recv(ctxt->fd, ctxt->inptr, XML_NANO_HTTP_CHUNK, 0); in xmlNanoHTTPRecv()
582 if (ctxt->last > 0) { in xmlNanoHTTPRecv()
583 ctxt->inptr += ctxt->last; in xmlNanoHTTPRecv()
584 return (ctxt->last); in xmlNanoHTTPRecv()
586 if (ctxt->last == 0) { in xmlNanoHTTPRecv()
589 if (ctxt->last == -1) { in xmlNanoHTTPRecv()
608 p.fd = ctxt->fd; in xmlNanoHTTPRecv()
618 if (ctxt->fd > FD_SETSIZE) in xmlNanoHTTPRecv()
631 FD_SET(ctxt->fd, &rfd); in xmlNanoHTTPRecv()
637 if ((select(ctxt->fd + 1, &rfd, NULL, NULL, &tv) < 1) in xmlNanoHTTPRecv()
660 xmlNanoHTTPReadLine(xmlNanoHTTPCtxtPtr ctxt) { in xmlNanoHTTPReadLine() argument
666 if (ctxt->inrptr == ctxt->inptr) { in xmlNanoHTTPReadLine()
667 if ( (rc = xmlNanoHTTPRecv(ctxt)) == 0) { in xmlNanoHTTPReadLine()
678 *bp = *ctxt->inrptr++; in xmlNanoHTTPReadLine()
706 xmlNanoHTTPScanAnswer(xmlNanoHTTPCtxtPtr ctxt, const char *line) { in xmlNanoHTTPScanAnswer() argument
741 ctxt->returnValue = ret; in xmlNanoHTTPScanAnswer()
742 ctxt->version = version; in xmlNanoHTTPScanAnswer()
747 if (ctxt->contentType != NULL) in xmlNanoHTTPScanAnswer()
748 xmlFree(ctxt->contentType); in xmlNanoHTTPScanAnswer()
749 ctxt->contentType = xmlMemStrdup(cur); in xmlNanoHTTPScanAnswer()
755 if (ctxt->mimeType != NULL) in xmlNanoHTTPScanAnswer()
756 xmlFree(ctxt->mimeType); in xmlNanoHTTPScanAnswer()
757 ctxt->mimeType = (char *) xmlStrndup(mime, last - mime); in xmlNanoHTTPScanAnswer()
758 charset = xmlStrstr(BAD_CAST ctxt->contentType, BAD_CAST "charset="); in xmlNanoHTTPScanAnswer()
765 if (ctxt->encoding != NULL) in xmlNanoHTTPScanAnswer()
766 xmlFree(ctxt->encoding); in xmlNanoHTTPScanAnswer()
767 ctxt->encoding = (char *) xmlStrndup(charset, last - charset); in xmlNanoHTTPScanAnswer()
772 if (ctxt->contentType != NULL) return; in xmlNanoHTTPScanAnswer()
774 ctxt->contentType = xmlMemStrdup(cur); in xmlNanoHTTPScanAnswer()
780 if (ctxt->mimeType != NULL) in xmlNanoHTTPScanAnswer()
781 xmlFree(ctxt->mimeType); in xmlNanoHTTPScanAnswer()
782 ctxt->mimeType = (char *) xmlStrndup(mime, last - mime); in xmlNanoHTTPScanAnswer()
783 charset = xmlStrstr(BAD_CAST ctxt->contentType, BAD_CAST "charset="); in xmlNanoHTTPScanAnswer()
790 if (ctxt->encoding != NULL) in xmlNanoHTTPScanAnswer()
791 xmlFree(ctxt->encoding); in xmlNanoHTTPScanAnswer()
792 ctxt->encoding = (char *) xmlStrndup(charset, last - charset); in xmlNanoHTTPScanAnswer()
797 if (ctxt->location != NULL) in xmlNanoHTTPScanAnswer()
798 xmlFree(ctxt->location); in xmlNanoHTTPScanAnswer()
802 xmlStrcat(tmp_http, (const xmlChar *) ctxt->hostname); in xmlNanoHTTPScanAnswer()
803 ctxt->location = in xmlNanoHTTPScanAnswer()
806 ctxt->location = xmlMemStrdup(cur); in xmlNanoHTTPScanAnswer()
811 if (ctxt->authHeader != NULL) in xmlNanoHTTPScanAnswer()
812 xmlFree(ctxt->authHeader); in xmlNanoHTTPScanAnswer()
813 ctxt->authHeader = xmlMemStrdup(cur); in xmlNanoHTTPScanAnswer()
817 if (ctxt->authHeader != NULL) in xmlNanoHTTPScanAnswer()
818 xmlFree(ctxt->authHeader); in xmlNanoHTTPScanAnswer()
819 ctxt->authHeader = xmlMemStrdup(cur); in xmlNanoHTTPScanAnswer()
825 ctxt->usesGzip = 1; in xmlNanoHTTPScanAnswer()
827 ctxt->strm = xmlMalloc(sizeof(z_stream)); in xmlNanoHTTPScanAnswer()
829 if (ctxt->strm != NULL) { in xmlNanoHTTPScanAnswer()
830 ctxt->strm->zalloc = Z_NULL; in xmlNanoHTTPScanAnswer()
831 ctxt->strm->zfree = Z_NULL; in xmlNanoHTTPScanAnswer()
832 ctxt->strm->opaque = Z_NULL; in xmlNanoHTTPScanAnswer()
833 ctxt->strm->avail_in = 0; in xmlNanoHTTPScanAnswer()
834 ctxt->strm->next_in = Z_NULL; in xmlNanoHTTPScanAnswer()
836 inflateInit2( ctxt->strm, 31 ); in xmlNanoHTTPScanAnswer()
842 ctxt->ContentLength = strtol( cur, NULL, 10 ); in xmlNanoHTTPScanAnswer()
1275 xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr) ctx; in xmlNanoHTTPRead() local
1287 if (ctxt->usesGzip == 1) { in xmlNanoHTTPRead()
1288 if (ctxt->strm == NULL) return(0); in xmlNanoHTTPRead()
1290 ctxt->strm->next_out = dest; in xmlNanoHTTPRead()
1291 ctxt->strm->avail_out = len; in xmlNanoHTTPRead()
1292 ctxt->strm->avail_in = ctxt->inptr - ctxt->inrptr; in xmlNanoHTTPRead()
1294 while (ctxt->strm->avail_out > 0 && in xmlNanoHTTPRead()
1295 (ctxt->strm->avail_in > 0 || xmlNanoHTTPRecv(ctxt) > 0)) { in xmlNanoHTTPRead()
1296 orig_avail_in = ctxt->strm->avail_in = in xmlNanoHTTPRead()
1297 ctxt->inptr - ctxt->inrptr - bytes_read; in xmlNanoHTTPRead()
1298 ctxt->strm->next_in = BAD_CAST (ctxt->inrptr + bytes_read); in xmlNanoHTTPRead()
1300 z_ret = inflate(ctxt->strm, Z_NO_FLUSH); in xmlNanoHTTPRead()
1301 bytes_read += orig_avail_in - ctxt->strm->avail_in; in xmlNanoHTTPRead()
1306 ctxt->inrptr += bytes_read; in xmlNanoHTTPRead()
1307 return(len - ctxt->strm->avail_out); in xmlNanoHTTPRead()
1311 while (ctxt->inptr - ctxt->inrptr < len) { in xmlNanoHTTPRead()
1312 if (xmlNanoHTTPRecv(ctxt) <= 0) break; in xmlNanoHTTPRead()
1314 if (ctxt->inptr - ctxt->inrptr < len) in xmlNanoHTTPRead()
1315 len = ctxt->inptr - ctxt->inrptr; in xmlNanoHTTPRead()
1316 memcpy(dest, ctxt->inrptr, len); in xmlNanoHTTPRead()
1317 ctxt->inrptr += len; in xmlNanoHTTPRead()
1330 xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr) ctx; in xmlNanoHTTPClose() local
1334 xmlNanoHTTPFreeCtxt(ctxt); in xmlNanoHTTPClose()
1359 xmlNanoHTTPCtxtPtr ctxt; in xmlNanoHTTPMethodRedir() local
1375 ctxt = xmlNanoHTTPNewCtxt(URL); in xmlNanoHTTPMethodRedir()
1376 if (ctxt == NULL) in xmlNanoHTTPMethodRedir()
1379 ctxt = xmlNanoHTTPNewCtxt(redirURL); in xmlNanoHTTPMethodRedir()
1380 if (ctxt == NULL) in xmlNanoHTTPMethodRedir()
1382 ctxt->location = xmlMemStrdup(redirURL); in xmlNanoHTTPMethodRedir()
1385 if ((ctxt->protocol == NULL) || (strcmp(ctxt->protocol, "http"))) { in xmlNanoHTTPMethodRedir()
1387 xmlNanoHTTPFreeCtxt(ctxt); in xmlNanoHTTPMethodRedir()
1391 if (ctxt->hostname == NULL) { in xmlNanoHTTPMethodRedir()
1394 xmlNanoHTTPFreeCtxt(ctxt); in xmlNanoHTTPMethodRedir()
1399 blen = strlen(ctxt->hostname) * 2 + 16; in xmlNanoHTTPMethodRedir()
1403 blen = strlen(ctxt->hostname); in xmlNanoHTTPMethodRedir()
1404 ret = xmlNanoHTTPConnectHost(ctxt->hostname, ctxt->port); in xmlNanoHTTPMethodRedir()
1407 xmlNanoHTTPFreeCtxt(ctxt); in xmlNanoHTTPMethodRedir()
1411 ctxt->fd = ret; in xmlNanoHTTPMethodRedir()
1423 if (ctxt->query != NULL) in xmlNanoHTTPMethodRedir()
1425 blen += strlen(ctxt->query) + 1; in xmlNanoHTTPMethodRedir()
1426 blen += strlen(method) + strlen(ctxt->path) + 24; in xmlNanoHTTPMethodRedir()
1431 if (ctxt->port != 80) { in xmlNanoHTTPMethodRedir()
1440 xmlNanoHTTPFreeCtxt( ctxt ); in xmlNanoHTTPMethodRedir()
1448 if (ctxt->port != 80) { in xmlNanoHTTPMethodRedir()
1450 method, ctxt->hostname, in xmlNanoHTTPMethodRedir()
1451 ctxt->port, ctxt->path ); in xmlNanoHTTPMethodRedir()
1455 ctxt->hostname, ctxt->path); in xmlNanoHTTPMethodRedir()
1458 p += snprintf( p, blen - (p - bp), "%s %s", method, ctxt->path); in xmlNanoHTTPMethodRedir()
1460 if (ctxt->query != NULL) in xmlNanoHTTPMethodRedir()
1461 p += snprintf( p, blen - (p - bp), "?%s", ctxt->query); in xmlNanoHTTPMethodRedir()
1463 if (ctxt->port == 80) { in xmlNanoHTTPMethodRedir()
1465 ctxt->hostname); in xmlNanoHTTPMethodRedir()
1468 ctxt->hostname, ctxt->port); in xmlNanoHTTPMethodRedir()
1493 ctxt->outptr = ctxt->out = bp; in xmlNanoHTTPMethodRedir()
1494 ctxt->state = XML_NANO_HTTP_WRITE; in xmlNanoHTTPMethodRedir()
1495 blen = strlen( ctxt->out ); in xmlNanoHTTPMethodRedir()
1497 xmt_bytes = xmlNanoHTTPSend(ctxt, ctxt->out, blen ); in xmlNanoHTTPMethodRedir()
1503 ctxt->hostname ); in xmlNanoHTTPMethodRedir()
1505 xmlNanoHTTPSend(ctxt, ctxt->out, blen ); in xmlNanoHTTPMethodRedir()
1510 xmt_bytes = xmlNanoHTTPSend( ctxt, input, ilen ); in xmlNanoHTTPMethodRedir()
1517 ctxt->hostname ); in xmlNanoHTTPMethodRedir()
1519 xmlNanoHTTPSend( ctxt, input, ilen ); in xmlNanoHTTPMethodRedir()
1523 ctxt->state = XML_NANO_HTTP_READ; in xmlNanoHTTPMethodRedir()
1525 while ((p = xmlNanoHTTPReadLine(ctxt)) != NULL) { in xmlNanoHTTPMethodRedir()
1527 ctxt->content = ctxt->inrptr; in xmlNanoHTTPMethodRedir()
1531 xmlNanoHTTPScanAnswer(ctxt, p); in xmlNanoHTTPMethodRedir()
1539 if ((ctxt->location != NULL) && (ctxt->returnValue >= 300) && in xmlNanoHTTPMethodRedir()
1540 (ctxt->returnValue < 400)) { in xmlNanoHTTPMethodRedir()
1543 "\nRedirect to: %s\n", ctxt->location); in xmlNanoHTTPMethodRedir()
1545 while ( xmlNanoHTTPRecv(ctxt) > 0 ) in xmlNanoHTTPMethodRedir()
1551 redirURL = xmlMemStrdup(ctxt->location); in xmlNanoHTTPMethodRedir()
1552 xmlNanoHTTPFreeCtxt(ctxt); in xmlNanoHTTPMethodRedir()
1555 xmlNanoHTTPFreeCtxt(ctxt); in xmlNanoHTTPMethodRedir()
1565 if (ctxt->contentType != NULL) in xmlNanoHTTPMethodRedir()
1566 *contentType = xmlMemStrdup(ctxt->contentType); in xmlNanoHTTPMethodRedir()
1581 if (ctxt->contentType != NULL) in xmlNanoHTTPMethodRedir()
1584 ctxt->returnValue, ctxt->contentType); in xmlNanoHTTPMethodRedir()
1588 ctxt->returnValue); in xmlNanoHTTPMethodRedir()
1591 return((void *) ctxt); in xmlNanoHTTPMethodRedir()
1633 void *ctxt = NULL; in xmlNanoHTTPFetch() local
1640 ctxt = xmlNanoHTTPOpen(URL, contentType); in xmlNanoHTTPFetch()
1641 if (ctxt == NULL) return(-1); in xmlNanoHTTPFetch()
1648 xmlNanoHTTPClose(ctxt); in xmlNanoHTTPFetch()
1657 xmlNanoHTTPFetchContent( ctxt, &buf, &len ); in xmlNanoHTTPFetch()
1664 xmlNanoHTTPClose(ctxt); in xmlNanoHTTPFetch()
1681 xmlNanoHTTPSave(void *ctxt, const char *filename) { in xmlNanoHTTPSave() argument
1687 if ((ctxt == NULL) || (filename == NULL)) return(-1); in xmlNanoHTTPSave()
1694 xmlNanoHTTPClose(ctxt); in xmlNanoHTTPSave()
1699 xmlNanoHTTPFetchContent( ctxt, &buf, &len ); in xmlNanoHTTPSave()
1706 xmlNanoHTTPClose(ctxt); in xmlNanoHTTPSave()
1722 xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr) ctx; in xmlNanoHTTPReturnCode() local
1724 if (ctxt == NULL) return(-1); in xmlNanoHTTPReturnCode()
1726 return(ctxt->returnValue); in xmlNanoHTTPReturnCode()
1740 xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr) ctx; in xmlNanoHTTPAuthHeader() local
1742 if (ctxt == NULL) return(NULL); in xmlNanoHTTPAuthHeader()
1744 return(ctxt->authHeader); in xmlNanoHTTPAuthHeader()
1759 xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr)ctx; in xmlNanoHTTPContentLength() local
1761 return ( ( ctxt == NULL ) ? -1 : ctxt->ContentLength ); in xmlNanoHTTPContentLength()
1774 xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr)ctx; in xmlNanoHTTPRedir() local
1776 return ( ( ctxt == NULL ) ? NULL : ctxt->location ); in xmlNanoHTTPRedir()
1789 xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr)ctx; in xmlNanoHTTPEncoding() local
1791 return ( ( ctxt == NULL ) ? NULL : ctxt->encoding ); in xmlNanoHTTPEncoding()
1804 xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr)ctx; in xmlNanoHTTPMimeType() local
1806 return ( ( ctxt == NULL ) ? NULL : ctxt->mimeType ); in xmlNanoHTTPMimeType()
1823 xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr)ctx; in xmlNanoHTTPFetchContent() local
1841 if ( ( ctxt == NULL ) || ( ctxt->content == NULL ) ) { in xmlNanoHTTPFetchContent()
1847 rcvd_lgth = ctxt->inptr - ctxt->content; in xmlNanoHTTPFetchContent()
1849 while ( (cur_lgth = xmlNanoHTTPRecv( ctxt )) > 0 ) { in xmlNanoHTTPFetchContent()
1852 if ( (ctxt->ContentLength > 0) && (rcvd_lgth >= ctxt->ContentLength) ) in xmlNanoHTTPFetchContent()
1856 *ptr = ctxt->content; in xmlNanoHTTPFetchContent()
1859 if ( ( ctxt->ContentLength > 0 ) && ( rcvd_lgth < ctxt->ContentLength ) ) in xmlNanoHTTPFetchContent()