From 5885d66e975547b89bc3b8478100063fadd4df8f Mon Sep 17 00:00:00 2001 From: phk Date: Sun, 15 Jun 2008 15:40:39 +0000 Subject: [PATCH] Polish VCT a bit more. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2684 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/include/libvarnish.h | 3 +++ varnish-cache/lib/libvarnish/vct.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/varnish-cache/include/libvarnish.h b/varnish-cache/include/libvarnish.h index bd51eebb..ab90e3dd 100644 --- a/varnish-cache/include/libvarnish.h +++ b/varnish-cache/include/libvarnish.h @@ -78,6 +78,9 @@ vct_is(unsigned char x, unsigned char y) #define vct_islws(x) vct_is(x, VCT_LWS) #define vct_isctl(x) vct_is(x, VCT_CTL) +/* NB: VCT always operate in ASCII, don't replace 0x0d with \r etc. */ +#define vct_skipcrlf(p) (p[0] == 0x0d && p[1] == 0x0a ? 2 : 1) + /* from libvarnish/version.c */ void varnish_version(const char *); diff --git a/varnish-cache/lib/libvarnish/vct.c b/varnish-cache/lib/libvarnish/vct.c index b4ac0150..4613b775 100644 --- a/varnish-cache/lib/libvarnish/vct.c +++ b/varnish-cache/lib/libvarnish/vct.c @@ -32,6 +32,8 @@ #include +/* NB: VCT always operate in ASCII, don't replace 0x0d with \r etc. */ + unsigned char vct_typtab[256] = { [0x00] = VCT_CTL, [0x01] = VCT_CTL, -- 2.39.5