Commit 025a3f5e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add a http_GetProto() function


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1967 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent a1eb0703
......@@ -463,6 +463,7 @@ void http_Setup(struct http *ht, void *space, unsigned len);
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);
......
......@@ -381,6 +381,13 @@ http_GetStatus(struct http *hp)
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]-')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment