MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / ReadRequest

Method ReadRequest

src/httpserver.cpp:1109–1125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1107}
1108
1109bool HTTPRemoteClient::ReadRequest(HTTPRequest& req)
1110{
1111 LineReader reader(m_recv_buffer, MAX_HEADERS_SIZE);
1112
1113 if (!req.LoadControlData(reader)) return false;
1114 if (!req.LoadHeaders(reader)) return false;
1115 if (!req.LoadBody(reader)) return false;
1116
1117 // Remove the bytes read out of the buffer.
1118 // If one of the above calls throws an error, the caller must
1119 // catch it and disconnect the client.
1120 m_recv_buffer.erase(
1121 m_recv_buffer.begin(),
1122 m_recv_buffer.begin() + reader.Consumed());
1123
1124 return true;
1125}
1126
1127bool HTTPRemoteClient::MaybeSendBytesFromBuffer()
1128{

Callers 1

Calls 6

LoadControlDataMethod · 0.80
LoadHeadersMethod · 0.80
LoadBodyMethod · 0.80
ConsumedMethod · 0.80
eraseMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected