Wrong error thrown when parsing trailer fields

This commit is contained in:
Guoye Zhang committed 2024-06-26 13:29:27 -07:00
1 parent 1ddbea1ee3
commit 981c910492
1 file changed
+2 -2
+2 -2
View File
@@ -36,7 +36,7 @@ struct HTTPParsedFields {
case invalidStatus
case responseWithRequestPseudo
case trailersWithPseudo
case trailerFieldsWithPseudo
case multipleContentLength
case multipleContentDisposition
@@ -138,7 +138,7 @@ struct HTTPParsedFields {
var trailerFields: HTTPFields {
get throws {
if self.method != nil || self.scheme != nil || self.authority != nil || self.path != nil || self.extendedConnectProtocol != nil || self.status != nil {
throw ParsingError.responseWithRequestPseudo
throw ParsingError.trailerFieldsWithPseudo
}
try validateFields()
return self.fields