Dolda2000 GitWeb
/
ashd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Send request data to multiplexer.
[ashd.git]
/
src
/
htparser.c
diff --git
a/src/htparser.c
b/src/htparser.c
index
57b7a26
..
c78f064
100644
(file)
--- 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;
char *hd;
struct charbuf inbuf, outbuf;
struct hthead *req, *resp;
- off_t sent;
+ off_t
dlen,
sent;
size_t headoff;
char nmbuf[256];
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);
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:
/*
* Find and decode the response header: