Skip to content

Commit e70e897

Browse files
committed
is always filename
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com> Change-Id: Ie83344607c8c8eb63f6826a3e2a38016a1346476
1 parent b0f32de commit e70e897

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

net/HttpRequest.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1925,14 +1925,14 @@ class ServerSession final : public ProtocolHandlerInterface
19251925
}
19261926

19271927
_size = sb.st_size;
1928-
_data = std::move(fromFile);
1928+
_filename = std::move(fromFile);
19291929
_responseHeaders = std::move(responseHeaders);
19301930
LOG_ASSERT_MSG(!getMimeType().empty(), "Missing Content-Type");
19311931

19321932
int firstBytePos = getStart();
19331933

19341934
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));
19361936
else
19371937
_pos = firstBytePos;
19381938

@@ -2043,7 +2043,7 @@ class ServerSession final : public ProtocolHandlerInterface
20432043
os << indent << "\tend: " << _end;
20442044
os << indent << "\tstartIsSuffix: " << _startIsSuffix;
20452045
os << indent;
2046-
HexUtil::dumpHex(os, _data, "\tdata:\n", Util::replace(indent + '\t', "\n", "").c_str());
2046+
HexUtil::dumpHex(os, _filename, "\tfilename:\n", Util::replace(indent + '\t', "\n", "").c_str());
20472047
os << '\n';
20482048

20492049
// We are typically called from the StreamSocket, so don't
@@ -2149,7 +2149,7 @@ class ServerSession final : public ProtocolHandlerInterface
21492149
const auto size = std::min({sizeof(buffer), capacity, (size_t)(getEnd() - _pos)});
21502150
int n;
21512151
while ((n = ::read(_fd, buffer, size)) < 0 && errno == EINTR)
2152-
LOG_TRC("EINTR reading from " << _data);
2152+
LOG_TRC("EINTR reading from " << _filename);
21532153

21542154
if (n <= 0 || _pos >= getEnd())
21552155
{
@@ -2211,7 +2211,7 @@ class ServerSession final : public ProtocolHandlerInterface
22112211
http::Header::Container _responseHeaders; ///< The data Content-Type.
22122212
std::chrono::microseconds _timeout;
22132213
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)
22152215
int _pos; ///< The current position in the data string.
22162216
int _size; ///< The size of the data in bytes.
22172217
int _fd; ///< The descriptor of the file to upload.

0 commit comments

Comments
 (0)