You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Readme.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,9 @@ Task {
55
55
}
56
56
}
57
57
} catch {
58
-
tryawait parser.finish()
58
+
// Calling finish might return messages that are considered complete now we know no more data is comming in. (For example a single HTTP request with no content length set.)
59
+
// It can also fail if the HTTP message is invalid at this point and throw an error.
Copy file name to clipboardExpand all lines: Sources/llhttp/HTTPMessagesParser.swift
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -207,9 +207,12 @@ public actor HTTPMessagesParser<MessageType: HTTPMessageType> {
207
207
///
208
208
/// Requests without Content-Length and other messages might require treating all incoming bytes as the part of the body, up to the last byte of the connection.
209
209
///
210
-
/// This method will trigger the callback if the request was terminated safely. Otherwise a error code would be returned.
211
-
publicfunc finish()asyncthrows{
210
+
/// This method will trigger the callback if the request was terminated safely. Otherwise an error would be thrown.
0 commit comments