Minor fixup for request line

This commit is contained in:
Alex Hultman
2022-10-24 20:25:56 +02:00
parent 368a4b41de
commit 0b590c923e
+3 -3
View File
@@ -193,7 +193,7 @@ private:
} }
static inline bool hasLess(uint64_t word) { static inline bool hasLess(uint64_t word) {
return word - ~0UL / 255 * 32 & ~word & ~0UL / 255 * 128; return (word - ~0UL / 255 * 32) & ~word & ~0UL / 255 * 128;
} }
static inline void *find_less(char *p, char */*end*/) { static inline void *find_less(char *p, char */*end*/) {
@@ -242,8 +242,8 @@ private:
if (postPaddedBuffer[0] == ':' && postPaddedBuffer[1] == ' ') { if (postPaddedBuffer[0] == ':' && postPaddedBuffer[1] == ' ') {
postPaddedBuffer += 2; postPaddedBuffer += 2;
} else { } else {
/* We should not accept whitespace between key and colon */ /* We should not accept whitespace between key and colon (unless on request line) */
if (postPaddedBuffer[0] != ':') { if (i && postPaddedBuffer[0] != ':') {
return 0; return 0;
} }
/* Trim until value starts */ /* Trim until value starts */