mirror of https://gitee.com/bigwinds/arangodb
fixed downloads
This commit is contained in:
parent
9d3b2019b0
commit
b0bd55adbe
|
@ -227,9 +227,15 @@ namespace triagens {
|
|||
_writeBuffer.appendText(l);
|
||||
_writeBuffer.appendText(" HTTP/1.1\r\n");
|
||||
|
||||
string hostname = _connection->getEndpoint()->getHostString();
|
||||
if (hostname.find(':') != string::npos) {
|
||||
hostname = hostname.substr(0, hostname.find(':'));
|
||||
}
|
||||
|
||||
_writeBuffer.appendText("Host: ");
|
||||
_writeBuffer.appendText(_connection->getEndpoint()->getHostString());
|
||||
_writeBuffer.appendText(hostname);
|
||||
_writeBuffer.appendText("\r\n");
|
||||
|
||||
_writeBuffer.appendText("Connection: Keep-Alive\r\n");
|
||||
_writeBuffer.appendText("User-Agent: VOC-Client/1.0\r\n");
|
||||
|
||||
|
@ -263,9 +269,14 @@ namespace triagens {
|
|||
_writeBuffer.appendText("\r\n");
|
||||
}
|
||||
|
||||
_writeBuffer.appendText("Content-Length: ");
|
||||
_writeBuffer.appendInteger(bodyLength);
|
||||
_writeBuffer.appendText("\r\n\r\n");
|
||||
if (method != HttpRequest::HTTP_REQUEST_GET) {
|
||||
_writeBuffer.appendText("Content-Length: ");
|
||||
_writeBuffer.appendInteger(bodyLength);
|
||||
_writeBuffer.appendText("\r\n\r\n");
|
||||
}
|
||||
else {
|
||||
_writeBuffer.appendText("\r\n");
|
||||
}
|
||||
_writeBuffer.appendText(body, bodyLength);
|
||||
|
||||
LOGGER_TRACE("Request: " << _writeBuffer.c_str());
|
||||
|
|
Loading…
Reference in New Issue