Dolda2000 GitWeb
/
ashd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fe8e38f
)
Send request data to multiplexer.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Wed, 17 Dec 2008 02:29:09 +0000
(
03:29
+0100)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Wed, 17 Dec 2008 02:29:09 +0000
(
03:29
+0100)
src/htparser.c
patch
|
blob
|
blame
|
history
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: