summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_http_client.cpp25
1 files changed, 8 insertions, 17 deletions
diff --git a/src/modules/m_http_client.cpp b/src/modules/m_http_client.cpp
index 9f8550886..0e942a545 100644
--- a/src/modules/m_http_client.cpp
+++ b/src/modules/m_http_client.cpp
@@ -313,10 +313,7 @@ bool HTTPSocket::OnDataReady()
this->buffer = "";
break;
}
-// while ((line = buffer.sstrstr(data, "\r\n")) != NULL)
-// {
-// if (strncmp(data, "\r\n", 2) == 0)
-
+
if (this->status == HTTP_REQSENT)
{
// HTTP reply (HTTP/1.1 200 msg)
@@ -329,22 +326,16 @@ bool HTTPSocket::OnDataReady()
if ((pos = line.find(':')) != std::string::npos)
{
-
-// char *hdata = strchr(data, ':');
-
-// if (!hdata)
-// continue;
-
-// *hdata = '\0';
-
-// response->AddHeader(data, hdata + 2);
response->AddHeader(line.substr(0, pos), line.substr(pos + 1));
-
-// data = lend + 2;
- } else
+ }
+ else
+ {
continue;
+ }
}
- } else {
+ }
+ else
+ {
this->data += data;
}
return true;