r1967 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Thu Sep 20 10:44:59 CEST 2007


Author: phk
Date: 2007-09-20 10:44:59 +0200 (Thu, 20 Sep 2007)
New Revision: 1967

Modified:
   trunk/varnish-cache/bin/varnishd/cache.h
   trunk/varnish-cache/bin/varnishd/cache_http.c
Log:
Add a http_GetProto() function


Modified: trunk/varnish-cache/bin/varnishd/cache.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache.h	2007-09-20 08:23:21 UTC (rev 1966)
+++ trunk/varnish-cache/bin/varnishd/cache.h	2007-09-20 08:44:59 UTC (rev 1967)
@@ -463,6 +463,7 @@
 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);

Modified: trunk/varnish-cache/bin/varnishd/cache_http.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_http.c	2007-09-20 08:23:21 UTC (rev 1966)
+++ trunk/varnish-cache/bin/varnishd/cache_http.c	2007-09-20 08:44:59 UTC (rev 1967)
@@ -381,6 +381,13 @@
 	    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]-')




More information about the varnish-commit mailing list