Commit 7a120ed7 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Decode the HTTP protocol version into a convenient struct http field.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@3290 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 3a1f6fd0
......@@ -137,6 +137,7 @@ struct http {
unsigned char conds; /* If-* headers present */
enum httpwhence logtag;
int status;
double protover;
txt hd[HTTP_HDR_MAX];
unsigned char hdf[HTTP_HDR_MAX];
......
......@@ -496,6 +496,13 @@ http_DissectRequest(struct sess *sp)
i = http_splitline(sp->wrk, sp->fd, hp, htc,
HTTP_HDR_REQ, HTTP_HDR_URL, HTTP_HDR_PROTO);
hp->protover = 0.9;
if (!strcmp(hp->hd[HTTP_HDR_PROTO].b, "HTTP/1.0"))
hp->protover = 1.0;
else if (!strcmp(hp->hd[HTTP_HDR_PROTO].b, "HTTP/1.1"))
hp->protover = 1.1;
else
hp->protover = 0.9;
if (i != 0)
WSPR(sp, SLT_HttpGarbage, htc->rxbuf);
......
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