[skip ci] Improve reading http message header
This commit is contained in:
1 parent
daf7966f4b
commit
fb811a6240
2 files changed
+16
-8
No files matched your search
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Bug in dash generation
|
- Bug in dash generation
|
||||||
|
- Bug in http server
|
||||||
|
|
||||||
## [0.41.7] - 2025-09-06
|
## [0.41.7] - 2025-09-06
|
||||||
|
|
||||||
|
|||||||
@@ -96,15 +96,22 @@ namespace Http
|
|||||||
return false
|
return false
|
||||||
end if
|
end if
|
||||||
|
|
||||||
operation = m.ReadHeaderLine()
|
firstChar = m.buffer.Mid(0, 1)
|
||||||
|
if Asc(firstChar) = &h16
|
||||||
|
LogErrorNoTelemetry("TLS handshake detected. HTTPS is not supported.")
|
||||||
|
m.ready_for_response = true
|
||||||
|
return false
|
||||||
|
end if
|
||||||
|
|
||||||
if operation = invalid or operation = ""
|
operation = m.ReadHeaderLine()
|
||||||
LogErrorNoTelemetry("empty request")
|
' Sometimes the first line is long enough that it doesn't fit in one read
|
||||||
LogTelemetryEvent({
|
' (e.g. very long URL). In that case, we just wait for more
|
||||||
level: "error"
|
if operation = invalid
|
||||||
message: "empty request: " + FormatJson({ "m.buffer": m.buffer, "m.buffer_index": m.buffer_index })
|
return false
|
||||||
fingerprint: ["HttpRequest: empty request"]
|
end if
|
||||||
})
|
|
||||||
|
if operation = ""
|
||||||
|
LogError("empty request")
|
||||||
m.ready_for_response = true
|
m.ready_for_response = true
|
||||||
return false
|
return false
|
||||||
end if
|
end if
|
||||||
|
|||||||
Reference in new issue
Block a user