X-Git-Url: http://www.dolda2000.com/gitweb/?a=blobdiff_plain;f=lib%2Freq.h;h=054d3c1d2e94859413b58c134421f7bf7d305481;hb=d9f67feaea01146d7ea10abfff2dc59ff8946ced;hp=a3fc0be75bfe18f02b82de31355947ca67000e49;hpb=41213112d34e04d3d088600c6b5eafeaab21330c;p=ashd.git diff --git a/lib/req.h b/lib/req.h index a3fc0be..054d3c1 100644 --- a/lib/req.h +++ b/lib/req.h @@ -1,6 +1,8 @@ #ifndef _LIB_HTREQ_H #define _LIB_HTREQ_H +#include + struct hthead { char *method, *url, *ver, *msg; int code; @@ -15,7 +17,14 @@ void freehthead(struct hthead *head); char *getheader(struct hthead *head, char *name); void headpreheader(struct hthead *head, const char *name, const char *val); void headappheader(struct hthead *head, const char *name, const char *val); -int sendreq(int sock, struct hthead *req); +void headrmheader(struct hthead *head, const char *name); +int sendreq2(int sock, struct hthead *req, int fd, int flags); +int sendreq(int sock, struct hthead *req, int fd); int recvreq(int sock, struct hthead **reqp); +void replrest(struct hthead *head, char *rest); +int parseheaders(struct hthead *head, FILE *in); +struct hthead *parseresponse(FILE *in); +int writeresp(FILE *out, struct hthead *resp); +char *unquoteurl(char *in); #endif