Skip to content

Commit 417b1de

Browse files
committed
Comments and fix bad cast.
1 parent 7502d88 commit 417b1de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libs/server-sent-events/src/curl_client.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,14 +391,14 @@ size_t CurlClient::HeaderCallback(const char* buffer,
391391
size_t nitems,
392392
void* userdata) {
393393
const size_t total_size = size * nitems;
394-
auto* client = static_cast<CurlClient*>(userdata);
394+
auto* context = static_cast<RequestContext*>(userdata);
395395

396396
// Check for Content-Type header
397397
if (const std::string header(buffer, total_size);
398398
header.find("Content-Type:") == 0 ||
399399
header.find("content-type:") == 0) {
400400
if (header.find("text/event-stream") == std::string::npos) {
401-
client->log_message("warning: unexpected Content-Type: " + header);
401+
context->log_message("warning: unexpected Content-Type: " + header);
402402
}
403403
}
404404

0 commit comments

Comments
 (0)