|
@@ -11,6 +11,7 @@
|
11
|
11
|
#include <netinet/in.h>
|
12
|
12
|
#include <netinet/tcp.h>
|
13
|
13
|
#include <algorithm>
|
|
14
|
+#include <csignal>
|
14
|
15
|
#include <memory>
|
15
|
16
|
#include <sstream>
|
16
|
17
|
#include <stdexcept>
|
|
@@ -24,12 +25,12 @@
|
24
|
25
|
#include "util/String.h"
|
25
|
26
|
#include "util/log/Log.h"
|
26
|
27
|
|
27
|
|
-using util::http::Socket;
|
28
|
|
-using util::http::Queue;
|
29
|
|
-using util::http::Req;
|
|
28
|
+using util::http::HeaderState;
|
30
|
29
|
using util::http::HttpErr;
|
31
|
30
|
using util::http::HttpServer;
|
32
|
|
-using util::http::HeaderState;
|
|
31
|
+using util::http::Queue;
|
|
32
|
+using util::http::Req;
|
|
33
|
+using util::http::Socket;
|
33
|
34
|
|
34
|
35
|
|
35
|
36
|
Socket::Socket(int port) {
|
|
@@ -71,6 +72,9 @@ int Socket::wait() {
|
71
|
72
|
|
72
|
73
|
|
73
|
74
|
void HttpServer::send(int sock, Answer* aw) {
|
|
75
|
+
|
|
76
|
+ signal(SIGPIPE, SIG_IGN);
|
|
77
|
+
|
74
|
78
|
std::string enc = "identity";
|
75
|
79
|
if (aw->gzip) aw->pl = compress(aw->pl, &enc);
|
76
|
80
|
|