Just pass the std::string not c_str()

pull/3530/head
Isaac Connor 2022-07-14 10:51:39 -04:00
parent 774adcf7cc
commit 90e27e9d3a
1 changed files with 3 additions and 3 deletions

View File

@ -379,7 +379,7 @@ int RemoteCameraHttp::GetResponse() {
request += stringtf( "Host: %s\r\n", host.c_str());
if ( strcmp( config.http_version, "1.0" ) == 0 )
request += "Connection: Keep-Alive\r\n";
request += mAuthenticator->getAuthHeader( "GET", path.c_str() );
request += mAuthenticator->getAuthHeader("GET", path);
request += "\r\n";
Debug( 2, "New request header: %s", request.c_str() );
@ -750,7 +750,7 @@ int RemoteCameraHttp::GetResponse() {
request += stringtf("Host: %s\r\n", host.c_str());
if ( strcmp(config.http_version, "1.0") == 0 )
request += "Connection: Keep-Alive\r\n";
request += mAuthenticator->getAuthHeader("GET", path.c_str());
request += mAuthenticator->getAuthHeader("GET", path);
request += "\r\n";
Debug(2, "New request header: %s", request.c_str());
@ -999,7 +999,7 @@ int RemoteCameraHttp::GetResponse() {
if (mode == MULTI_IMAGE) {
// Look for the boundary marker, determine content length using it's position
if (char *start_ptr = (char *)memstr( (char *)buffer, "\r\n--", buffer_size)) {
if (const char *start_ptr = (char *)memstr( (char *)buffer, "\r\n--", buffer_size)) {
content_length = start_ptr - (char *)buffer;
Debug(2, "Got end of image by pattern (crlf--), content-length = %d", content_length);
} else {