mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 18:31:12 +02:00
Revert "nhttpd: let sendfile() support files >= 2GB"
This reverts commit 9842afecad8dfb91dfd7221aedbeaf5379a89534.
Origin commit data
------------------
Commit: cf0bf3fa20
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2014-08-17 (Sun, 17 Aug 2014)
This commit is contained in:
committed by
[CST] Focus
parent
66dd571a4b
commit
2c6a4d3885
@@ -47,7 +47,6 @@
|
||||
//=============================================================================
|
||||
#ifndef __yhttpd_yhook_h__
|
||||
#define __yhttpd_yhook_h__
|
||||
#include <unistd.h>
|
||||
// C++
|
||||
#include <string>
|
||||
#include <list>
|
||||
@@ -129,7 +128,7 @@ public:
|
||||
HttpResponseType httpStatus; // http-status code for response
|
||||
std::string ResponseMimeType; // mime-type for response
|
||||
std::string NewURL; // new URL for Redirection
|
||||
off_t ContentLength; // Length of Response Body
|
||||
long ContentLength; // Length of Response Body
|
||||
time_t LastModified; // Last Modified Time of Item to send / -1 dynamic content
|
||||
std::string Sendfile; // Path & Name (local os style) of file to send
|
||||
bool keep_alive;
|
||||
@@ -174,8 +173,8 @@ public:
|
||||
void SetError(HttpResponseType responseType, THandleStatus _status)
|
||||
{SetError(responseType); status = _status;}
|
||||
// others
|
||||
off_t GetContentLength()
|
||||
{return (status==HANDLED_SENDFILE)?ContentLength : (off_t)yresult.length();}
|
||||
long GetContentLength()
|
||||
{return (status==HANDLED_SENDFILE)?ContentLength : (long)yresult.length();}
|
||||
// output methods
|
||||
std::string BuildHeader(bool cache = false);
|
||||
void addResult(const std::string& result) {yresult += result;}
|
||||
|
Reference in New Issue
Block a user