require gcc 4.9 because of incomplete regex support in gcc 4.8
This commit is contained in:
parent
63f0b61ea1
commit
118beffe71
3 changed files with 12 additions and 5 deletions
|
@ -14,7 +14,7 @@ Precise map-matching for public transit schedules (GTFS data).
|
|||
## Requirements
|
||||
|
||||
* `cmake`
|
||||
* `gcc >= 4.8` (or `clang >= 5.0`)
|
||||
* `gcc >= 4.9` (or `clang >= 5.0`)
|
||||
|
||||
## Building and Installation
|
||||
|
||||
|
|
|
@ -110,11 +110,11 @@ void HttpServer::handle() {
|
|||
answ = _handler->handle(req, connection);
|
||||
answ.gzip = gzipSupport(req);
|
||||
} catch (HttpErr err) {
|
||||
answ = Answer{err.what(), err.what(), false, {}};
|
||||
answ = Answer(err.what(), err.what());
|
||||
} catch (...) {
|
||||
// catch everything to make sure the server continues running
|
||||
answ = Answer{
|
||||
"500 Internal Server Error", "500 Internal Server Error", false, {}};
|
||||
answ = Answer(
|
||||
"500 Internal Server Error", "500 Internal Server Error");
|
||||
}
|
||||
|
||||
send(connection, &answ);
|
||||
|
@ -151,7 +151,8 @@ Req HttpServer::getReq(int connection) {
|
|||
int64_t curRcvd = 0;
|
||||
HeaderState state = NONE;
|
||||
Req ret{"", "", "", "", {}};
|
||||
char *tmp, *tmp2;
|
||||
char *tmp = 0;
|
||||
char *tmp2 = 0;
|
||||
char* brk = 0;
|
||||
|
||||
while ((curRcvd = read(connection, buf + rcvd, BSIZE - rcvd))) {
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include <unistd.h>
|
||||
|
@ -62,6 +63,11 @@ struct Req {
|
|||
* HTTP Answer
|
||||
*/
|
||||
struct Answer {
|
||||
Answer() : status(""), pl(""), gzip(false) {}
|
||||
Answer(const std::string& status, const std::string& pl)
|
||||
: status(status), pl(pl), gzip(false) {}
|
||||
Answer(const std::string& status, const std::string& pl, bool gz)
|
||||
: status(status), pl(pl), gzip(gz) {}
|
||||
std::string status, pl;
|
||||
bool gzip;
|
||||
std::unordered_map<std::string, std::string> params;
|
||||
|
|
Loading…
Reference in a new issue