diff options
author | Alexander Tkachev | 2016-07-08 16:00:11 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | f0fc18d2ee02c61524486aa1e73b781a6f64ef23 (patch) | |
tree | 6f7cbfb9ea64ec9018601a4e381c02a4589c63c3 /backends/networking/sdl_net/reader.cpp | |
parent | f3ee9e3272c76236a5f234d00cb9ba1afa81ef60 (diff) | |
download | scummvm-rg350-f0fc18d2ee02c61524486aa1e73b781a6f64ef23.tar.gz scummvm-rg350-f0fc18d2ee02c61524486aa1e73b781a6f64ef23.tar.bz2 scummvm-rg350-f0fc18d2ee02c61524486aa1e73b781a6f64ef23.zip |
CLOUD: Add UploadFileHandler
Diffstat (limited to 'backends/networking/sdl_net/reader.cpp')
-rw-r--r-- | backends/networking/sdl_net/reader.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/backends/networking/sdl_net/reader.cpp b/backends/networking/sdl_net/reader.cpp index 698c20919e..e08d5db566 100644 --- a/backends/networking/sdl_net/reader.cpp +++ b/backends/networking/sdl_net/reader.cpp @@ -51,6 +51,7 @@ Reader::Reader(): _randomSource("Networking::Reader") { _headers = ""; _stream = nullptr; + _firstBlock = true; _contentLength = 0; _availableBytes = 0; @@ -98,6 +99,7 @@ Reader &Reader::operator=(Reader &r) { _headers = r._headers; _stream = r._stream; + _firstBlock = r._firstBlock; r._stream = nullptr; _headers = r._headers; @@ -383,6 +385,7 @@ Common::String generateTempFileName(Common::String originalFilename, Common::Ran bool Reader::readContent() { Common::String boundary = "--" + _boundary; + if (!_firstBlock) boundary = "\r\n" + boundary; if (_window == nullptr) { makeWindow(boundary.size()); @@ -403,6 +406,7 @@ bool Reader::readContent() { if (!bytesLeft()) return false; } + _firstBlock = false; if (_isFileField) { if (_stream != nullptr) { _stream->flush(); @@ -514,6 +518,8 @@ Common::String Reader::query() const { return _query; } Common::String Reader::queryParameter(Common::String name) const { return _queryParameters[name]; } +Common::String Reader::attachedFile(Common::String name) const { return _attachedFiles[name]; } + Common::String Reader::anchor() const { return _anchor; } } // End of namespace Networking |