[6.0] e68d3209b Use the right version of the vct_ishdrval() macro

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Thu Apr 4 14:33:08 UTC 2024


commit e68d3209bc56ea68854b8fdf6afdc322fdaac6e5
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Fri Oct 9 14:36:42 2020 +0200

    Use the right version of the vct_ishdrval() macro
    
    I accidentally committed an earlier, wrong version. o/ Dridi
    
    Ref #3407
    
    https://github.com/varnishcache/varnish-cache/pull/3407#issuecomment-696146625
    
    Conflicts:
            include/vct.h
    
    The previous commit introduces more than just this macro and was skipped
    on purpose.

diff --git a/include/vct.h b/include/vct.h
index 1b7ffbd4f..a6edd4bd2 100644
--- a/include/vct.h
+++ b/include/vct.h
@@ -75,6 +75,8 @@ vct_is(int x, uint16_t y)
 #define vct_isxmlnamestart(x) vct_is(x, VCT_XMLNAMESTART)
 #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_ishdrval(x) \
+    (((uint8_t)(x) >= 0x20 && (uint8_t)(x) != 0x7f) ||(uint8_t)(x) == 0x09)
 
 static inline int
 vct_iscrlf(const char* p, const char* end)


More information about the varnish-commit mailing list