|
|
|
|
@ -426,7 +426,6 @@ struct MHD_Response* handle_random(struct MHD_Connection * connection,
|
|
|
|
|
bool acceptEncodingDeflate)
|
|
|
|
|
{
|
|
|
|
|
std::string httpRedirection;
|
|
|
|
|
bool cacheEnabled = false;
|
|
|
|
|
httpResponseCode = MHD_HTTP_FOUND;
|
|
|
|
|
if (reader != NULL) {
|
|
|
|
|
pthread_mutex_lock(&readerLock);
|
|
|
|
|
@ -449,7 +448,6 @@ struct MHD_Response* handle_content(struct MHD_Connection * connection,
|
|
|
|
|
std::string baseUrl;
|
|
|
|
|
std::string content;
|
|
|
|
|
std::string mimeType;
|
|
|
|
|
unsigned int contentLength;
|
|
|
|
|
|
|
|
|
|
bool found = false;
|
|
|
|
|
zim::Article article;
|
|
|
|
|
@ -591,7 +589,7 @@ static int accessHandlerCallback(void *cls,
|
|
|
|
|
const char* acceptEncodingHeaderValue = MHD_lookup_connection_value(connection, MHD_HEADER_KIND, MHD_HTTP_HEADER_ACCEPT_ENCODING);
|
|
|
|
|
const bool acceptEncodingDeflate = acceptEncodingHeaderValue && string(acceptEncodingHeaderValue).find("deflate") != string::npos;
|
|
|
|
|
|
|
|
|
|
/* Check if range is requested */
|
|
|
|
|
/* Check if range is requested. [TODO] Handle this somehow */
|
|
|
|
|
const char* acceptRangeHeaderValue = MHD_lookup_connection_value(connection, MHD_HEADER_KIND, MHD_HTTP_HEADER_RANGE);
|
|
|
|
|
const bool acceptRange = acceptRangeHeaderValue != NULL;
|
|
|
|
|
|
|
|
|
|
@ -956,7 +954,6 @@ int main(int argc, char **argv) {
|
|
|
|
|
struct sockaddr_in sockAddr;
|
|
|
|
|
struct ifaddrs *ifaddr, *ifa;
|
|
|
|
|
int family, n;
|
|
|
|
|
char host[NI_MAXHOST];
|
|
|
|
|
|
|
|
|
|
/* Search all available interfaces */
|
|
|
|
|
if (getifaddrs(&ifaddr) == -1) {
|
|
|
|
|
|