Skip to content

Commit 566aca7

Browse files
committed
Fixing some comments.
1 parent 7857cff commit 566aca7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lldb/include/lldb/Host/JSONTransport.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ class JSONTransport {
123123
else
124124
callback(loop, llvm::json::parse<T>(message));
125125

126-
// On EOF, request termination after handling all the messages.
126+
// On EOF, notify the callback after the remaining messages were
127+
// handled.
127128
if (len == 0)
128129
callback(loop, llvm::make_error<TransportEOFError>());
129130
},

lldb/source/Host/common/JSONTransport.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,15 @@ Expected<std::vector<std::string>> HTTPDelimitedJSONTransport::Parse() {
5959
continue;
6060
}
6161

62-
// HTTP Headers are `<field-name>: [<field-value>]`.
62+
// HTTP Headers are formatted like `<field-name> ':' [<field-value>]`.
6363
if (!header.contains(kHeaderFieldSeparator))
6464
return make_error<StringError>("malformed content header",
6565
inconvertibleErrorCode());
6666

6767
auto [name, value] = header.split(kHeaderFieldSeparator);
68+
69+
// Handle known headers, at the moment only "Content-Length" is supported,
70+
// other headers are ignored.
6871
if (name.lower() == kHeaderContentLength.lower()) {
6972
value = value.trim();
7073
if (value.trim().consumeInteger(10, content_length))

0 commit comments

Comments
 (0)