@@ -1925,14 +1925,14 @@ class ServerSession final : public ProtocolHandlerInterface
1925
1925
}
1926
1926
1927
1927
_size = sb.st_size ;
1928
- _data = std::move (fromFile);
1928
+ _filename = std::move (fromFile);
1929
1929
_responseHeaders = std::move (responseHeaders);
1930
1930
LOG_ASSERT_MSG (!getMimeType ().empty (), " Missing Content-Type" );
1931
1931
1932
1932
int firstBytePos = getStart ();
1933
1933
1934
1934
if (lseek (_fd, firstBytePos, SEEK_SET) < 0 )
1935
- LOG_SYS (" Failed to seek " << _data << " to " << firstBytePos << " because: " << strerror (errno));
1935
+ LOG_SYS (" Failed to seek " << _filename << " to " << firstBytePos << " because: " << strerror (errno));
1936
1936
else
1937
1937
_pos = firstBytePos;
1938
1938
@@ -2043,7 +2043,7 @@ class ServerSession final : public ProtocolHandlerInterface
2043
2043
os << indent << " \t end: " << _end;
2044
2044
os << indent << " \t startIsSuffix: " << _startIsSuffix;
2045
2045
os << indent;
2046
- HexUtil::dumpHex (os, _data , " \t data :\n " , Util::replace (indent + ' \t ' , " \n " , " " ).c_str ());
2046
+ HexUtil::dumpHex (os, _filename , " \t filename :\n " , Util::replace (indent + ' \t ' , " \n " , " " ).c_str ());
2047
2047
os << ' \n ' ;
2048
2048
2049
2049
// We are typically called from the StreamSocket, so don't
@@ -2149,7 +2149,7 @@ class ServerSession final : public ProtocolHandlerInterface
2149
2149
const auto size = std::min ({sizeof (buffer), capacity, (size_t )(getEnd () - _pos)});
2150
2150
int n;
2151
2151
while ((n = ::read (_fd, buffer, size)) < 0 && errno == EINTR)
2152
- LOG_TRC (" EINTR reading from " << _data );
2152
+ LOG_TRC (" EINTR reading from " << _filename );
2153
2153
2154
2154
if (n <= 0 || _pos >= getEnd ())
2155
2155
{
@@ -2211,7 +2211,7 @@ class ServerSession final : public ProtocolHandlerInterface
2211
2211
http::Header::Container _responseHeaders; // /< The data Content-Type.
2212
2212
std::chrono::microseconds _timeout;
2213
2213
std::chrono::steady_clock::time_point _startTime;
2214
- std::string _data ; // /< Data to upload, if not from a file, OR, the filename (if _pos == -1).
2214
+ std::string _filename ; // /< The filename (if _fd != -1)
2215
2215
int _pos; // /< The current position in the data string.
2216
2216
int _size; // /< The size of the data in bytes.
2217
2217
int _fd; // /< The descriptor of the file to upload.
0 commit comments