>> I would like to pass the extra buffered data to the guy I am execing then let >> him read the rest directly from the socket, but I see no existing way to do >> that. > > httpd passes the headers and any left over buffer it has already read to > /magic > apps through a command line param. there's a function for parsing and placing > the "unread" stuff in the input buffer that's tied to the fd. > > /sys/src/libhttpd/hio.c:233: hunload(Hio *h)
also: /sys/src/libhttpd/hio.c:274: hload(Hio *h, char *buf) /sys/src/cmd/ip/httpd/init.c:23: init(int argc, char **argv)