From f85f5afe65a4924e4bd292e7f26fd371d027ff30 Mon Sep 17 00:00:00 2001 From: Justin Maggard Date: Sun, 2 Aug 2015 23:51:07 -0700 Subject: [PATCH] upnphttp: Fix inadvertently removed line from 8e201fe. --- upnphttp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/upnphttp.c b/upnphttp.c index 6e03635..6905f17 100644 --- a/upnphttp.c +++ b/upnphttp.c @@ -161,6 +161,7 @@ ParseHttpHeaders(struct upnphttp * h) p = colon; while(*p && (*p < '0' || *p > '9')) p++; + h->req_contentlen = atoi(p); if(h->req_contentlen < 0) { DPRINTF(E_WARN, L_HTTP, "Invalid Content-Length %d", h->req_contentlen); h->req_contentlen = 0; @@ -878,7 +879,7 @@ ProcessHttpQuery_upnphttp(struct upnphttp * h) h->state = 100; } - DPRINTF(E_DEBUG, L_HTTP, "HTTP REQUEST: %.*s\n", h->req_buflen, h->req_buf); + DPRINTF(E_DEBUG, L_HTTP, "HTTP REQUEST[%d]: %.*s\n", h->state, h->req_buflen, h->req_buf); if(strcmp("POST", HttpCommand) == 0) { h->req_command = EPost;