mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 08:00:38 +03:00
Do not include iomanip in HTTPServer.cpp, fix typo.
This commit is contained in:
parent
64d3aa9c56
commit
a2e6acbd44
@ -2,7 +2,6 @@
|
|||||||
#include <boost/lexical_cast.hpp>
|
#include <boost/lexical_cast.hpp>
|
||||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include <iomanip>
|
|
||||||
#include "util/base64.h"
|
#include "util/base64.h"
|
||||||
#include "util/Log.h"
|
#include "util/Log.h"
|
||||||
#include "tunnel/Tunnel.h"
|
#include "tunnel/Tunnel.h"
|
||||||
@ -492,7 +491,7 @@ namespace util
|
|||||||
buffers.push_back(boost::asio::buffer("HTTP/1.1 ", 9));
|
buffers.push_back(boost::asio::buffer("HTTP/1.1 ", 9));
|
||||||
buffers.push_back(boost::asio::buffer(boost::lexical_cast<std::string>(status), 3));
|
buffers.push_back(boost::asio::buffer(boost::lexical_cast<std::string>(status), 3));
|
||||||
buffers.push_back(boost::asio::buffer(" ", 1));
|
buffers.push_back(boost::asio::buffer(" ", 1));
|
||||||
std::string status_string = "WTF";
|
std::string status_string;
|
||||||
switch (status)
|
switch (status)
|
||||||
{
|
{
|
||||||
case 105: status_string = "Name Not Resolved"; break;
|
case 105: status_string = "Name Not Resolved"; break;
|
||||||
@ -917,7 +916,7 @@ namespace util
|
|||||||
{
|
{
|
||||||
m_Reply.content = content;
|
m_Reply.content = content;
|
||||||
m_Reply.headers.resize(3);
|
m_Reply.headers.resize(3);
|
||||||
// we need the date header to be complaint with http 1.1
|
// we need the date header to be compliant with HTTP 1.1
|
||||||
std::time_t time_now = std::time(nullptr);
|
std::time_t time_now = std::time(nullptr);
|
||||||
char time_buff[128];
|
char time_buff[128];
|
||||||
if ( std::strftime(time_buff, sizeof(time_buff), "%a, %d %b %Y %H:%M:%S GMT", std::gmtime(&time_now)) ) {
|
if ( std::strftime(time_buff, sizeof(time_buff), "%a, %d %b %Y %H:%M:%S GMT", std::gmtime(&time_now)) ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user