X-Git-Url: http://www.dolda2000.com/gitweb/?a=blobdiff_plain;f=lib%2Freq.h;h=71a7a06d37ffdc2c36e369e221751d9565e6714d;hb=58ee5c4ab4ce9be692277b520de72735494bd9f7;hp=7fc70be2a3f7bde97353611cac723ae7e526992b;hpb=af34331c8aae9bacdae3655546b2fb6eb2fbe23f;p=ashd.git diff --git a/lib/req.h b/lib/req.h index 7fc70be..71a7a06 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,8 +17,13 @@ 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); +void headrmheader(struct hthead *head, const char *name); 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