r2044 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Wed Sep 26 20:56:18 CEST 2007


Author: phk
Date: 2007-09-26 20:56:18 +0200 (Wed, 26 Sep 2007)
New Revision: 2044

Modified:
   trunk/varnish-cache/bin/varnishd/cache.h
   trunk/varnish-cache/bin/varnishd/cache_http.c
   trunk/varnish-cache/bin/varnishd/cache_pool.c
Log:
struct http_hdr is more than that, it is a general text handle, so
typedef it as "txt" instead.



Modified: trunk/varnish-cache/bin/varnishd/cache.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache.h	2007-09-25 13:19:07 UTC (rev 2043)
+++ trunk/varnish-cache/bin/varnishd/cache.h	2007-09-26 18:56:18 UTC (rev 2044)
@@ -102,10 +102,10 @@
  * HTTP Request/Response/Header handling structure.
  */
 
-struct http_hdr {
+typedef struct {
 	char			*b;
 	char			*e;
-};
+} txt;
 
 enum httpwhence {
 	HTTP_Rx,
@@ -124,7 +124,7 @@
 	unsigned char		conds;		/* If-* headers present */
 	enum httpwhence 	logtag;
 
-	struct http_hdr		hd[HTTP_HDR_MAX];
+	txt 			hd[HTTP_HDR_MAX];
 	unsigned char		hdf[HTTP_HDR_MAX];
 #define HDF_FILTER		(1 << 0)	/* Filtered by Connection */
 	unsigned		nhd;
@@ -493,7 +493,7 @@
 void WRK_Reset(struct worker *w, int *fd);
 unsigned WRK_Flush(struct worker *w);
 unsigned WRK_Write(struct worker *w, const void *ptr, int len);
-unsigned WRK_WriteH(struct worker *w, const struct http_hdr *hh, const char *suf);
+unsigned WRK_WriteH(struct worker *w, const txt *hh, const char *suf);
 #ifdef HAVE_SENDFILE
 void WRK_Sendfile(struct worker *w, int fd, off_t off, unsigned len);
 #endif  /* HAVE_SENDFILE */

Modified: trunk/varnish-cache/bin/varnishd/cache_http.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_http.c	2007-09-25 13:19:07 UTC (rev 2043)
+++ trunk/varnish-cache/bin/varnishd/cache_http.c	2007-09-26 18:56:18 UTC (rev 2044)
@@ -174,7 +174,7 @@
 
 
 static int
-http_IsHdr(const struct http_hdr *hh, const char *hdr)
+http_IsHdr(const txt *hh, const char *hdr)
 {
 	unsigned l;
 

Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_pool.c	2007-09-25 13:19:07 UTC (rev 2043)
+++ trunk/varnish-cache/bin/varnishd/cache_pool.c	2007-09-26 18:56:18 UTC (rev 2044)
@@ -108,7 +108,7 @@
 }
 
 unsigned
-WRK_WriteH(struct worker *w, const struct http_hdr *hh, const char *suf)
+WRK_WriteH(struct worker *w, const txt *hh, const char *suf)
 {
 	unsigned u;
 




More information about the varnish-commit mailing list