We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bdb9db0 commit c296ca3Copy full SHA for c296ca3
Sources/Apollo/ResponseParsing/MultipartResponseSpecificationParser.swift
@@ -36,14 +36,15 @@ enum MultipartResponseParsing {
36
37
38
struct DataLineIterator: IteratorProtocol {
39
- /// A double carriage return. Used as the seperator between data lines within a multipart response chunk
+ /// A double carriage return. Used as the separator between data lines within a multipart response chunk
40
private static let DataLineSeparator: Data = CRLF + CRLF // "\r\n\r\n"
41
42
var data: Data
43
44
mutating func next() -> Data? {
45
guard !data.isEmpty else { return nil }
46
guard let separatorRange = data.firstRange(of: Self.DataLineSeparator) else {
47
+ defer { data = Data() }
48
return data
49
}
50
0 commit comments