[master] eef7871 ASCII ALL THE THINGS

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Tue Jun 27 14:14:06 CEST 2017


commit eef7871e509d97c6376f3e808a75e5ac4fe1bf74
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Tue Jun 27 14:13:20 2017 +0200

    ASCII ALL THE THINGS

diff --git a/include/vct.h b/include/vct.h
index 7659d99..24143a3 100644
--- a/include/vct.h
+++ b/include/vct.h
@@ -76,7 +76,7 @@ vct_is(int x, uint16_t y)
 #define vct_isxmlname(x) vct_is(x, VCT_XMLNAMESTART | VCT_XMLNAME)
 #define vct_istchar(x) vct_is(x, VCT_ALPHA | VCT_DIGIT | VCT_TCHAR)
 
-#define vct_iscrlf(p) (((p)[0] == '\r' && (p)[1] == '\n') || (p)[0] == '\n')
+#define vct_iscrlf(p) (((p)[0] == 0x0d && (p)[1] == 0x0a) || (p)[0] == 0x0a)
 
 /* 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)



More information about the varnish-commit mailing list