int http_GetHdr(struct http *hp, const char *hdr, char **ptr);
int http_GetHdrField(struct http *hp, const char *hdr, const char *field, char **ptr);
int http_GetStatus(struct http *hp);
+const char *http_GetProto(struct http *hp);
int http_HdrIs(struct http *hp, const char *hdr, const char *val);
int http_GetTail(struct http *hp, unsigned len, char **b, char **e);
int http_Read(struct http *hp, int fd, void *b, unsigned len);
NULL /* XXX */, 10));
}
+const char *
+http_GetProto(struct http *hp)
+{
+ AN(hp->hd[HTTP_HDR_PROTO].b);
+ return (hp->hd[HTTP_HDR_PROTO].b);
+}
+
/*--------------------------------------------------------------------
* Dissect the headers of the HTTP protocol message.
* Detect conditionals (headers which start with '^[Ii][Ff]-')