From a0327573bb6032e02e988a0d0aed709b4be7a422 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Wed, 17 Dec 2008 03:29:09 +0100 Subject: [PATCH] Send request data to multiplexer. --- src/htparser.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/htparser.c b/src/htparser.c index 57b7a26..c78f064 100644 --- a/src/htparser.c +++ b/src/htparser.c @@ -342,7 +342,7 @@ static void serve(struct muth *muth, va_list args) char *hd; struct charbuf inbuf, outbuf; struct hthead *req, *resp; - off_t sent; + off_t dlen, sent; size_t headoff; char nmbuf[256]; @@ -382,6 +382,15 @@ static void serve(struct muth *muth, va_list args) headappheader(req, "X-Ash-Port", sprintf3("%i", ntohs(((struct sockaddr_in6 *)&name)->sin6_port))); } cfd = sendreq(plex, req); + + /* + * If there is message data, pass it: + */ + if((hd = getheader(req, "content-length")) != NULL) { + dlen = atoo(hd); + if(dlen > 0) + passdata(fd, cfd, &inbuf, dlen); + } /* * Find and decode the response header: -- 2.11.0