File tree 1 file changed +2
-0
lines changed
1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -872,6 +872,7 @@ pub const BaseProtocolHeader = struct {
872
872
':' = > {
873
873
// The ": " is not being added to the buffer here!
874
874
if (try reader .readByte () != ' ' ) return error .InvalidHeaderField ;
875
+ if (maybe_colon_index != null ) return error .InvalidHeaderField ; // duplicate ':'
875
876
maybe_colon_index = buffer_index ;
876
877
},
877
878
else = > {
@@ -915,6 +916,7 @@ pub const BaseProtocolHeader = struct {
915
916
try expectParseError ("contentLength: 32\r \n \r \n " , error .MissingContentLength );
916
917
try expectParseError ("content-length: abababababab\r \n \r \n " , error .InvalidContentLength );
917
918
try expectParseError ("content-length: 9999999999999999999999999999999999\r \n \r \n " , error .OversizedMessage );
919
+ try expectParseError ("content-length: : 32\r \n \r \n " , error .InvalidHeaderField );
918
920
919
921
try expectParse ("content-length: 32\r \n \r \n " , .{ .content_length = 32 });
920
922
try expectParse ("Content-Length: 32\r \n \r \n " , .{ .content_length = 32 });
You can’t perform that action at this time.
0 commit comments