Lines Matching defs:httpread
2 * httpread - Manage reading file(s) from HTTP/TCP socket
39 #include "httpread.h"
50 struct httpread {
53 void (*cb)(struct httpread *handle, void *cookie,
127 void httpread_destroy(struct httpread *h)
147 struct httpread *h = user_ctx;
148 wpa_printf(MSG_DEBUG, "httpread timeout (%p)", h);
157 struct httpread *h,
171 "httpread: Unacceptable Content-Length %d",
199 static int httpread_hdr_analyze(struct httpread *h)
369 struct httpread *h = sock_ctx;
379 wpa_printf(MSG_DEBUG, "httpread: Trying to read more data(%p)", h);
382 wpa_printf(MSG_DEBUG, "httpread failed: %s", strerror(errno));
385 wpa_hexdump_ascii(MSG_MSGDUMP, "httpread - read", readbuf, nread);
393 wpa_printf(MSG_DEBUG, "httpread premature eof(%p)", h);
399 "httpread premature eof(%p) %d/%d",
408 wpa_printf(MSG_DEBUG, "httpread ok eof(%p)", h);
429 "httpread: Too long header");
447 wpa_printf(MSG_DEBUG, "httpread bad hdr(%p)", h);
451 wpa_printf(MSG_DEBUG, "httpread no body hdr end(%p)",
457 "httpread zero content length(%p)", h);
470 wpa_printf(MSG_DEBUG, "httpread NO BODY for sp. type");
493 "httpread: body_nbytes=%d >= max_bytes=%d",
510 "httpread: Unacceptable body length %d (body_alloc_nbytes=%u max_bytes=%u)",
519 "httpread: Failed to reallocate buffer (len=%d)",
543 "httpread: Unexpected chunk header value (not a hex digit)");
550 "httpread: Invalid chunk size %d",
564 "httpread end chunks(%p)",
585 "httpread: Invalid chunk end");
598 "httpread got content(%p)", h);
624 "httpread: Invalid ncopy=%d", ncopy);
662 "httpread got content(%p)",
686 wpa_printf(MSG_DEBUG, "httpread read/parse failure (%p)", h);
691 wpa_printf(MSG_DEBUG, "httpread: get more (%p)", h);
695 wpa_printf(MSG_DEBUG, "httpread got file %d bytes type %d",
697 wpa_hexdump_ascii(MSG_MSGDUMP, "httpread: body",
729 struct httpread * httpread_create(
731 void (*cb)(struct httpread *handle, void *cookie,
738 struct httpread *h = NULL;
771 enum httpread_hdr_type httpread_hdr_type_get(struct httpread *h)
780 char * httpread_uri_get(struct httpread *h)
787 int httpread_reply_code_get(struct httpread *h)
794 int httpread_length_get(struct httpread *h)
804 void * httpread_data_get(struct httpread *h)
814 char * httpread_hdr_get(struct httpread *h)
828 char * httpread_hdr_line_get(struct httpread *h, const char *tag)