Fix readline

This commit is contained in:
2026-01-07 12:09:15 -06:00
parent f88cc21a85
commit 7dc4ad9b08
5 changed files with 34 additions and 10 deletions

View File

@@ -104,7 +104,7 @@ namespace Tesses::Framework::Http {
auto stout = p.GetStdoutStream();
Tesses::Framework::TextStreams::StreamReader reader(stout);
std::string line;
while(reader.ReadLine(line))
while(reader.ReadLineHttp(line))
{
auto v = HttpUtils::SplitString(line,": ", 2);
if(v.size() == 2)

View File

@@ -159,7 +159,7 @@ namespace Tesses::Framework::Http
this->handleStrm=nullptr;
StreamReader reader(strm);
std::string statusLine;
if(!reader.ReadLine(statusLine)) return;
if(!reader.ReadLineHttp(statusLine)) return;
auto statusLinesPart = HttpUtils::SplitString(statusLine," ",3);
if(statusLinesPart.size() >= 2)
{
@@ -167,7 +167,7 @@ namespace Tesses::Framework::Http
this->statusCode = (StatusCode)std::stoi(statusLinesPart[1]);
}
std::string line;
while(reader.ReadLine(line))
while(reader.ReadLineHttp(line))
{
if(line.empty()) break;
auto v = HttpUtils::SplitString(line,": ", 2);
@@ -225,7 +225,7 @@ namespace Tesses::Framework::Http
StreamReader reader(strm);
std::string statusLine;
if(!reader.ReadLine(statusLine)) break;
if(!reader.ReadLineHttp(statusLine)) break;
auto statusLinesPart = HttpUtils::SplitString(statusLine," ",3);
if(statusLinesPart.size() >= 2)
{
@@ -233,7 +233,7 @@ namespace Tesses::Framework::Http
this->statusCode = (StatusCode)std::stoi(statusLinesPart[1]);
}
std::string line;
while(reader.ReadLine(line))
while(reader.ReadLineHttp(line))
{
if(line.empty()) break;
auto v = HttpUtils::SplitString(line,": ", 2);

View File

@@ -468,7 +468,7 @@ namespace Tesses::Framework::Http
HttpDictionary req;
StreamReader reader(ctx->GetStream());
std::string line;
while(reader.ReadLine(line))
while(reader.ReadLineHttp(line))
{
auto v = HttpUtils::SplitString(line,": ", 2);
if(v.size() == 2)
@@ -944,7 +944,7 @@ namespace Tesses::Framework::Http
try{
bool firstLine = true;
std::string line;
while(reader.ReadLine(line))
while(reader.ReadLineHttp(line))
{
if(firstLine)
{