Lines Matching refs:ctxt

277 xmlNanoHTTPScanURL(xmlNanoHTTPCtxtPtr ctxt, const char *URL) {  in xmlNanoHTTPScanURL()  argument
284 if (ctxt->protocol != NULL) { in xmlNanoHTTPScanURL()
285 xmlFree(ctxt->protocol); in xmlNanoHTTPScanURL()
286 ctxt->protocol = NULL; in xmlNanoHTTPScanURL()
288 if (ctxt->hostname != NULL) { in xmlNanoHTTPScanURL()
289 xmlFree(ctxt->hostname); in xmlNanoHTTPScanURL()
290 ctxt->hostname = NULL; in xmlNanoHTTPScanURL()
292 if (ctxt->path != NULL) { in xmlNanoHTTPScanURL()
293 xmlFree(ctxt->path); in xmlNanoHTTPScanURL()
294 ctxt->path = NULL; in xmlNanoHTTPScanURL()
296 if (ctxt->query != NULL) { in xmlNanoHTTPScanURL()
297 xmlFree(ctxt->query); in xmlNanoHTTPScanURL()
298 ctxt->query = NULL; in xmlNanoHTTPScanURL()
311 ctxt->protocol = xmlMemStrdup(uri->scheme); in xmlNanoHTTPScanURL()
316 ctxt->hostname = (char *) xmlCharStrndup(uri->server + 1, len -2); in xmlNanoHTTPScanURL()
318 ctxt->hostname = xmlMemStrdup(uri->server); in xmlNanoHTTPScanURL()
320 ctxt->hostname = xmlMemStrdup(uri->server); in xmlNanoHTTPScanURL()
322 ctxt->path = xmlMemStrdup(uri->path); in xmlNanoHTTPScanURL()
324 ctxt->path = xmlMemStrdup("/"); in xmlNanoHTTPScanURL()
326 ctxt->query = xmlMemStrdup(uri->query); in xmlNanoHTTPScanURL()
328 ctxt->port = uri->port; in xmlNanoHTTPScanURL()
417 xmlNanoHTTPFreeCtxt(xmlNanoHTTPCtxtPtr ctxt) { in xmlNanoHTTPFreeCtxt() argument
418 if (ctxt == NULL) return; in xmlNanoHTTPFreeCtxt()
419 if (ctxt->hostname != NULL) xmlFree(ctxt->hostname); in xmlNanoHTTPFreeCtxt()
420 if (ctxt->protocol != NULL) xmlFree(ctxt->protocol); in xmlNanoHTTPFreeCtxt()
421 if (ctxt->path != NULL) xmlFree(ctxt->path); in xmlNanoHTTPFreeCtxt()
422 if (ctxt->query != NULL) xmlFree(ctxt->query); in xmlNanoHTTPFreeCtxt()
423 if (ctxt->out != NULL) xmlFree(ctxt->out); in xmlNanoHTTPFreeCtxt()
424 if (ctxt->in != NULL) xmlFree(ctxt->in); in xmlNanoHTTPFreeCtxt()
425 if (ctxt->contentType != NULL) xmlFree(ctxt->contentType); in xmlNanoHTTPFreeCtxt()
426 if (ctxt->encoding != NULL) xmlFree(ctxt->encoding); in xmlNanoHTTPFreeCtxt()
427 if (ctxt->mimeType != NULL) xmlFree(ctxt->mimeType); in xmlNanoHTTPFreeCtxt()
428 if (ctxt->location != NULL) xmlFree(ctxt->location); in xmlNanoHTTPFreeCtxt()
429 if (ctxt->authHeader != NULL) xmlFree(ctxt->authHeader); in xmlNanoHTTPFreeCtxt()
431 if (ctxt->strm != NULL) { in xmlNanoHTTPFreeCtxt()
432 inflateEnd(ctxt->strm); in xmlNanoHTTPFreeCtxt()
433 xmlFree(ctxt->strm); in xmlNanoHTTPFreeCtxt()
437 ctxt->state = XML_NANO_HTTP_NONE; in xmlNanoHTTPFreeCtxt()
438 if (ctxt->fd != INVALID_SOCKET) closesocket(ctxt->fd); in xmlNanoHTTPFreeCtxt()
439 ctxt->fd = INVALID_SOCKET; in xmlNanoHTTPFreeCtxt()
440 xmlFree(ctxt); in xmlNanoHTTPFreeCtxt()
452 xmlNanoHTTPSend(xmlNanoHTTPCtxtPtr ctxt, const char *xmt_ptr, int outlen) in xmlNanoHTTPSend() argument
462 if ((ctxt->state & XML_NANO_HTTP_WRITE) && (xmt_ptr != NULL)) { in xmlNanoHTTPSend()
464 int nsent = send(ctxt->fd, SEND_ARG2_CAST (xmt_ptr + total_sent), in xmlNanoHTTPSend()
487 if (ctxt->fd > FD_SETSIZE) in xmlNanoHTTPSend()
498 FD_SET(ctxt->fd, &wfd); in xmlNanoHTTPSend()
502 (void) select(ctxt->fd + 1, NULL, &wfd, NULL, &tv); in xmlNanoHTTPSend()
504 p.fd = ctxt->fd; in xmlNanoHTTPSend()
526 xmlNanoHTTPRecv(xmlNanoHTTPCtxtPtr ctxt) in xmlNanoHTTPRecv() argument
536 while (ctxt->state & XML_NANO_HTTP_READ) { in xmlNanoHTTPRecv()
537 if (ctxt->in == NULL) { in xmlNanoHTTPRecv()
538 ctxt->in = (char *) xmlMallocAtomic(65000 * sizeof(char)); in xmlNanoHTTPRecv()
539 if (ctxt->in == NULL) { in xmlNanoHTTPRecv()
541 ctxt->last = -1; in xmlNanoHTTPRecv()
544 ctxt->inlen = 65000; in xmlNanoHTTPRecv()
545 ctxt->inptr = ctxt->content = ctxt->inrptr = ctxt->in; in xmlNanoHTTPRecv()
547 if (ctxt->inrptr > ctxt->in + XML_NANO_HTTP_CHUNK) { in xmlNanoHTTPRecv()
548 int delta = ctxt->inrptr - ctxt->in; in xmlNanoHTTPRecv()
549 int len = ctxt->inptr - ctxt->inrptr; in xmlNanoHTTPRecv()
551 memmove(ctxt->in, ctxt->inrptr, len); in xmlNanoHTTPRecv()
552 ctxt->inrptr -= delta; in xmlNanoHTTPRecv()
553 ctxt->content -= delta; in xmlNanoHTTPRecv()
554 ctxt->inptr -= delta; in xmlNanoHTTPRecv()
556 if ((ctxt->in + ctxt->inlen) < (ctxt->inptr + XML_NANO_HTTP_CHUNK)) { in xmlNanoHTTPRecv()
557 int d_inptr = ctxt->inptr - ctxt->in; in xmlNanoHTTPRecv()
558 int d_content = ctxt->content - ctxt->in; in xmlNanoHTTPRecv()
559 int d_inrptr = ctxt->inrptr - ctxt->in; in xmlNanoHTTPRecv()
560 char *tmp_ptr = ctxt->in; in xmlNanoHTTPRecv()
562 ctxt->inlen *= 2; in xmlNanoHTTPRecv()
563 ctxt->in = (char *) xmlRealloc(tmp_ptr, ctxt->inlen); in xmlNanoHTTPRecv()
564 if (ctxt->in == NULL) { in xmlNanoHTTPRecv()
567 ctxt->last = -1; in xmlNanoHTTPRecv()
570 ctxt->inptr = ctxt->in + d_inptr; in xmlNanoHTTPRecv()
571 ctxt->content = ctxt->in + d_content; in xmlNanoHTTPRecv()
572 ctxt->inrptr = ctxt->in + d_inrptr; in xmlNanoHTTPRecv()
574 ctxt->last = recv(ctxt->fd, ctxt->inptr, XML_NANO_HTTP_CHUNK, 0); in xmlNanoHTTPRecv()
575 if (ctxt->last > 0) { in xmlNanoHTTPRecv()
576 ctxt->inptr += ctxt->last; in xmlNanoHTTPRecv()
577 return (ctxt->last); in xmlNanoHTTPRecv()
579 if (ctxt->last == 0) { in xmlNanoHTTPRecv()
582 if (ctxt->last == -1) { in xmlNanoHTTPRecv()
601 p.fd = ctxt->fd; in xmlNanoHTTPRecv()
611 if (ctxt->fd > FD_SETSIZE) in xmlNanoHTTPRecv()
624 FD_SET(ctxt->fd, &rfd); in xmlNanoHTTPRecv()
630 if ((select(ctxt->fd + 1, &rfd, NULL, NULL, &tv) < 1) in xmlNanoHTTPRecv()
653 xmlNanoHTTPReadLine(xmlNanoHTTPCtxtPtr ctxt) { in xmlNanoHTTPReadLine() argument
659 if (ctxt->inrptr == ctxt->inptr) { in xmlNanoHTTPReadLine()
660 if ( (rc = xmlNanoHTTPRecv(ctxt)) == 0) { in xmlNanoHTTPReadLine()
671 *bp = *ctxt->inrptr++; in xmlNanoHTTPReadLine()
699 xmlNanoHTTPScanAnswer(xmlNanoHTTPCtxtPtr ctxt, const char *line) { in xmlNanoHTTPScanAnswer() argument
734 ctxt->returnValue = ret; in xmlNanoHTTPScanAnswer()
735 ctxt->version = version; in xmlNanoHTTPScanAnswer()
740 if (ctxt->contentType != NULL) in xmlNanoHTTPScanAnswer()
741 xmlFree(ctxt->contentType); in xmlNanoHTTPScanAnswer()
742 ctxt->contentType = xmlMemStrdup(cur); in xmlNanoHTTPScanAnswer()
748 if (ctxt->mimeType != NULL) in xmlNanoHTTPScanAnswer()
749 xmlFree(ctxt->mimeType); in xmlNanoHTTPScanAnswer()
750 ctxt->mimeType = (char *) xmlStrndup(mime, last - mime); in xmlNanoHTTPScanAnswer()
751 charset = xmlStrstr(BAD_CAST ctxt->contentType, BAD_CAST "charset="); in xmlNanoHTTPScanAnswer()
758 if (ctxt->encoding != NULL) in xmlNanoHTTPScanAnswer()
759 xmlFree(ctxt->encoding); in xmlNanoHTTPScanAnswer()
760 ctxt->encoding = (char *) xmlStrndup(charset, last - charset); in xmlNanoHTTPScanAnswer()
765 if (ctxt->contentType != NULL) return; in xmlNanoHTTPScanAnswer()
767 ctxt->contentType = xmlMemStrdup(cur); in xmlNanoHTTPScanAnswer()
773 if (ctxt->mimeType != NULL) in xmlNanoHTTPScanAnswer()
774 xmlFree(ctxt->mimeType); in xmlNanoHTTPScanAnswer()
775 ctxt->mimeType = (char *) xmlStrndup(mime, last - mime); in xmlNanoHTTPScanAnswer()
776 charset = xmlStrstr(BAD_CAST ctxt->contentType, BAD_CAST "charset="); in xmlNanoHTTPScanAnswer()
783 if (ctxt->encoding != NULL) in xmlNanoHTTPScanAnswer()
784 xmlFree(ctxt->encoding); in xmlNanoHTTPScanAnswer()
785 ctxt->encoding = (char *) xmlStrndup(charset, last - charset); in xmlNanoHTTPScanAnswer()
790 if (ctxt->location != NULL) in xmlNanoHTTPScanAnswer()
791 xmlFree(ctxt->location); in xmlNanoHTTPScanAnswer()
795 xmlStrcat(tmp_http, (const xmlChar *) ctxt->hostname); in xmlNanoHTTPScanAnswer()
796 ctxt->location = in xmlNanoHTTPScanAnswer()
799 ctxt->location = xmlMemStrdup(cur); in xmlNanoHTTPScanAnswer()
804 if (ctxt->authHeader != NULL) in xmlNanoHTTPScanAnswer()
805 xmlFree(ctxt->authHeader); in xmlNanoHTTPScanAnswer()
806 ctxt->authHeader = xmlMemStrdup(cur); in xmlNanoHTTPScanAnswer()
810 if (ctxt->authHeader != NULL) in xmlNanoHTTPScanAnswer()
811 xmlFree(ctxt->authHeader); in xmlNanoHTTPScanAnswer()
812 ctxt->authHeader = xmlMemStrdup(cur); in xmlNanoHTTPScanAnswer()
818 ctxt->usesGzip = 1; in xmlNanoHTTPScanAnswer()
820 ctxt->strm = xmlMalloc(sizeof(z_stream)); in xmlNanoHTTPScanAnswer()
822 if (ctxt->strm != NULL) { in xmlNanoHTTPScanAnswer()
823 ctxt->strm->zalloc = Z_NULL; in xmlNanoHTTPScanAnswer()
824 ctxt->strm->zfree = Z_NULL; in xmlNanoHTTPScanAnswer()
825 ctxt->strm->opaque = Z_NULL; in xmlNanoHTTPScanAnswer()
826 ctxt->strm->avail_in = 0; in xmlNanoHTTPScanAnswer()
827 ctxt->strm->next_in = Z_NULL; in xmlNanoHTTPScanAnswer()
829 inflateInit2( ctxt->strm, 31 ); in xmlNanoHTTPScanAnswer()
835 ctxt->ContentLength = strtol( cur, NULL, 10 ); in xmlNanoHTTPScanAnswer()
1267 xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr) ctx; in xmlNanoHTTPRead() local
1279 if (ctxt->usesGzip == 1) { in xmlNanoHTTPRead()
1280 if (ctxt->strm == NULL) return(0); in xmlNanoHTTPRead()
1282 ctxt->strm->next_out = dest; in xmlNanoHTTPRead()
1283 ctxt->strm->avail_out = len; in xmlNanoHTTPRead()
1284 ctxt->strm->avail_in = ctxt->inptr - ctxt->inrptr; in xmlNanoHTTPRead()
1286 while (ctxt->strm->avail_out > 0 && in xmlNanoHTTPRead()
1287 (ctxt->strm->avail_in > 0 || xmlNanoHTTPRecv(ctxt) > 0)) { in xmlNanoHTTPRead()
1288 orig_avail_in = ctxt->strm->avail_in = in xmlNanoHTTPRead()
1289 ctxt->inptr - ctxt->inrptr - bytes_read; in xmlNanoHTTPRead()
1290 ctxt->strm->next_in = BAD_CAST (ctxt->inrptr + bytes_read); in xmlNanoHTTPRead()
1292 z_ret = inflate(ctxt->strm, Z_NO_FLUSH); in xmlNanoHTTPRead()
1293 bytes_read += orig_avail_in - ctxt->strm->avail_in; in xmlNanoHTTPRead()
1298 ctxt->inrptr += bytes_read; in xmlNanoHTTPRead()
1299 return(len - ctxt->strm->avail_out); in xmlNanoHTTPRead()
1303 while (ctxt->inptr - ctxt->inrptr < len) { in xmlNanoHTTPRead()
1304 if (xmlNanoHTTPRecv(ctxt) <= 0) break; in xmlNanoHTTPRead()
1306 if (ctxt->inptr - ctxt->inrptr < len) in xmlNanoHTTPRead()
1307 len = ctxt->inptr - ctxt->inrptr; in xmlNanoHTTPRead()
1308 memcpy(dest, ctxt->inrptr, len); in xmlNanoHTTPRead()
1309 ctxt->inrptr += len; in xmlNanoHTTPRead()
1322 xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr) ctx; in xmlNanoHTTPClose() local
1326 xmlNanoHTTPFreeCtxt(ctxt); in xmlNanoHTTPClose()
1351 xmlNanoHTTPCtxtPtr ctxt; in xmlNanoHTTPMethodRedir() local
1367 ctxt = xmlNanoHTTPNewCtxt(URL); in xmlNanoHTTPMethodRedir()
1368 if (ctxt == NULL) in xmlNanoHTTPMethodRedir()
1371 ctxt = xmlNanoHTTPNewCtxt(redirURL); in xmlNanoHTTPMethodRedir()
1372 if (ctxt == NULL) in xmlNanoHTTPMethodRedir()
1374 ctxt->location = xmlMemStrdup(redirURL); in xmlNanoHTTPMethodRedir()
1377 if ((ctxt->protocol == NULL) || (strcmp(ctxt->protocol, "http"))) { in xmlNanoHTTPMethodRedir()
1379 xmlNanoHTTPFreeCtxt(ctxt); in xmlNanoHTTPMethodRedir()
1383 if (ctxt->hostname == NULL) { in xmlNanoHTTPMethodRedir()
1386 xmlNanoHTTPFreeCtxt(ctxt); in xmlNanoHTTPMethodRedir()
1391 blen = strlen(ctxt->hostname) * 2 + 16; in xmlNanoHTTPMethodRedir()
1395 blen = strlen(ctxt->hostname); in xmlNanoHTTPMethodRedir()
1396 ret = xmlNanoHTTPConnectHost(ctxt->hostname, ctxt->port); in xmlNanoHTTPMethodRedir()
1399 xmlNanoHTTPFreeCtxt(ctxt); in xmlNanoHTTPMethodRedir()
1403 ctxt->fd = ret; in xmlNanoHTTPMethodRedir()
1415 if (ctxt->query != NULL) in xmlNanoHTTPMethodRedir()
1417 blen += strlen(ctxt->query) + 1; in xmlNanoHTTPMethodRedir()
1418 blen += strlen(method) + strlen(ctxt->path) + 24; in xmlNanoHTTPMethodRedir()
1423 if (ctxt->port != 80) { in xmlNanoHTTPMethodRedir()
1432 xmlNanoHTTPFreeCtxt( ctxt ); in xmlNanoHTTPMethodRedir()
1440 if (ctxt->port != 80) { in xmlNanoHTTPMethodRedir()
1442 method, ctxt->hostname, in xmlNanoHTTPMethodRedir()
1443 ctxt->port, ctxt->path ); in xmlNanoHTTPMethodRedir()
1447 ctxt->hostname, ctxt->path); in xmlNanoHTTPMethodRedir()
1450 p += snprintf( p, blen - (p - bp), "%s %s", method, ctxt->path); in xmlNanoHTTPMethodRedir()
1452 if (ctxt->query != NULL) in xmlNanoHTTPMethodRedir()
1453 p += snprintf( p, blen - (p - bp), "?%s", ctxt->query); in xmlNanoHTTPMethodRedir()
1455 if (ctxt->port == 80) { in xmlNanoHTTPMethodRedir()
1457 ctxt->hostname); in xmlNanoHTTPMethodRedir()
1460 ctxt->hostname, ctxt->port); in xmlNanoHTTPMethodRedir()
1485 ctxt->outptr = ctxt->out = bp; in xmlNanoHTTPMethodRedir()
1486 ctxt->state = XML_NANO_HTTP_WRITE; in xmlNanoHTTPMethodRedir()
1487 blen = strlen( ctxt->out ); in xmlNanoHTTPMethodRedir()
1489 xmt_bytes = xmlNanoHTTPSend(ctxt, ctxt->out, blen ); in xmlNanoHTTPMethodRedir()
1495 ctxt->hostname ); in xmlNanoHTTPMethodRedir()
1497 xmlNanoHTTPSend(ctxt, ctxt->out, blen ); in xmlNanoHTTPMethodRedir()
1502 xmt_bytes = xmlNanoHTTPSend( ctxt, input, ilen ); in xmlNanoHTTPMethodRedir()
1509 ctxt->hostname ); in xmlNanoHTTPMethodRedir()
1511 xmlNanoHTTPSend( ctxt, input, ilen ); in xmlNanoHTTPMethodRedir()
1515 ctxt->state = XML_NANO_HTTP_READ; in xmlNanoHTTPMethodRedir()
1517 while ((p = xmlNanoHTTPReadLine(ctxt)) != NULL) { in xmlNanoHTTPMethodRedir()
1519 ctxt->content = ctxt->inrptr; in xmlNanoHTTPMethodRedir()
1523 xmlNanoHTTPScanAnswer(ctxt, p); in xmlNanoHTTPMethodRedir()
1531 if ((ctxt->location != NULL) && (ctxt->returnValue >= 300) && in xmlNanoHTTPMethodRedir()
1532 (ctxt->returnValue < 400)) { in xmlNanoHTTPMethodRedir()
1535 "\nRedirect to: %s\n", ctxt->location); in xmlNanoHTTPMethodRedir()
1537 while ( xmlNanoHTTPRecv(ctxt) > 0 ) ; in xmlNanoHTTPMethodRedir()
1542 redirURL = xmlMemStrdup(ctxt->location); in xmlNanoHTTPMethodRedir()
1543 xmlNanoHTTPFreeCtxt(ctxt); in xmlNanoHTTPMethodRedir()
1546 xmlNanoHTTPFreeCtxt(ctxt); in xmlNanoHTTPMethodRedir()
1556 if (ctxt->contentType != NULL) in xmlNanoHTTPMethodRedir()
1557 *contentType = xmlMemStrdup(ctxt->contentType); in xmlNanoHTTPMethodRedir()
1572 if (ctxt->contentType != NULL) in xmlNanoHTTPMethodRedir()
1575 ctxt->returnValue, ctxt->contentType); in xmlNanoHTTPMethodRedir()
1579 ctxt->returnValue); in xmlNanoHTTPMethodRedir()
1582 return((void *) ctxt); in xmlNanoHTTPMethodRedir()
1624 void *ctxt = NULL; in xmlNanoHTTPFetch() local
1631 ctxt = xmlNanoHTTPOpen(URL, contentType); in xmlNanoHTTPFetch()
1632 if (ctxt == NULL) return(-1); in xmlNanoHTTPFetch()
1639 xmlNanoHTTPClose(ctxt); in xmlNanoHTTPFetch()
1648 xmlNanoHTTPFetchContent( ctxt, &buf, &len ); in xmlNanoHTTPFetch()
1655 xmlNanoHTTPClose(ctxt); in xmlNanoHTTPFetch()
1672 xmlNanoHTTPSave(void *ctxt, const char *filename) { in xmlNanoHTTPSave() argument
1678 if ((ctxt == NULL) || (filename == NULL)) return(-1); in xmlNanoHTTPSave()
1685 xmlNanoHTTPClose(ctxt); in xmlNanoHTTPSave()
1690 xmlNanoHTTPFetchContent( ctxt, &buf, &len ); in xmlNanoHTTPSave()
1697 xmlNanoHTTPClose(ctxt); in xmlNanoHTTPSave()
1713 xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr) ctx; in xmlNanoHTTPReturnCode() local
1715 if (ctxt == NULL) return(-1); in xmlNanoHTTPReturnCode()
1717 return(ctxt->returnValue); in xmlNanoHTTPReturnCode()
1731 xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr) ctx; in xmlNanoHTTPAuthHeader() local
1733 if (ctxt == NULL) return(NULL); in xmlNanoHTTPAuthHeader()
1735 return(ctxt->authHeader); in xmlNanoHTTPAuthHeader()
1750 xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr)ctx; in xmlNanoHTTPContentLength() local
1752 return ( ( ctxt == NULL ) ? -1 : ctxt->ContentLength ); in xmlNanoHTTPContentLength()
1765 xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr)ctx; in xmlNanoHTTPRedir() local
1767 return ( ( ctxt == NULL ) ? NULL : ctxt->location ); in xmlNanoHTTPRedir()
1780 xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr)ctx; in xmlNanoHTTPEncoding() local
1782 return ( ( ctxt == NULL ) ? NULL : ctxt->encoding ); in xmlNanoHTTPEncoding()
1795 xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr)ctx; in xmlNanoHTTPMimeType() local
1797 return ( ( ctxt == NULL ) ? NULL : ctxt->mimeType ); in xmlNanoHTTPMimeType()
1814 xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr)ctx; in xmlNanoHTTPFetchContent() local
1832 if ( ( ctxt == NULL ) || ( ctxt->content == NULL ) ) { in xmlNanoHTTPFetchContent()
1838 rcvd_lgth = ctxt->inptr - ctxt->content; in xmlNanoHTTPFetchContent()
1840 while ( (cur_lgth = xmlNanoHTTPRecv( ctxt )) > 0 ) { in xmlNanoHTTPFetchContent()
1843 if ( (ctxt->ContentLength > 0) && (rcvd_lgth >= ctxt->ContentLength) ) in xmlNanoHTTPFetchContent()
1847 *ptr = ctxt->content; in xmlNanoHTTPFetchContent()
1850 if ( ( ctxt->ContentLength > 0 ) && ( rcvd_lgth < ctxt->ContentLength ) ) in xmlNanoHTTPFetchContent()