Commit c25f4725 authored by Sergei Golubchik's avatar Sergei Golubchik

5.2->5.3 merge

parents f76bfc40 b5d41c1c
...@@ -155,7 +155,7 @@ int Url_http::send(const char* data, size_t data_length) ...@@ -155,7 +155,7 @@ int Url_http::send(const char* data, size_t data_length)
{ {
my_socket fd= INVALID_SOCKET; my_socket fd= INVALID_SOCKET;
char buf[1024]; char buf[1024];
uint len; uint len= 0;
addrinfo *addrs, *addr, filter= {0, AF_UNSPEC, SOCK_STREAM, 6, 0, 0, 0, 0}; addrinfo *addrs, *addr, filter= {0, AF_UNSPEC, SOCK_STREAM, 6, 0, 0, 0, 0};
int res= getaddrinfo(host.str, port.str, &filter, &addrs); int res= getaddrinfo(host.str, port.str, &filter, &addrs);
...@@ -258,7 +258,13 @@ int Url_http::send(const char* data, size_t data_length) ...@@ -258,7 +258,13 @@ int Url_http::send(const char* data, size_t data_length)
Extract the first string between <h1>...</h1> tags Extract the first string between <h1>...</h1> tags
and put it as a server reply into the error log. and put it as a server reply into the error log.
*/ */
len= vio_read(vio, (uchar*)buf, sizeof(buf)-1); for (;;)
{
size_t i= vio_read(vio, (uchar*)buf + len, sizeof(buf) - len - 1);
if ((int)i <= 0)
break;
len+= i;
}
if (len && len < sizeof(buf)) if (len && len < sizeof(buf))
{ {
char *from; char *from;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment