aboutsummaryrefslogtreecommitdiff
path: root/backends/networking/sdl_net/reader.cpp
AgeCommit message (Collapse)Author
2016-08-24CLOUD: Update LocalWebserverAlexander Tkachev
Reader now reads headers into stream, and some checks are added there and in UploadFileClientHandler, so if headers are too long, they are treated as bad request.
2016-08-24ALL: Fix debug, warning and error usageAlexander Tkachev
Added prefixes, used debug(9).
2016-08-24CLOUD: JANITORIAL: Fix code formattingEugene Sandulenko
2016-08-24CLOUD: Fix code formattingPeter Bozsó
2016-08-24JANITORIAL: Remove spaces at the end of the lineAlexander Tkachev
I knew there were some, but I wanted to fix them once, instead of doing it all the time.
2016-08-24CLOUD: Cleanup in Reader and ClientAlexander Tkachev
2016-08-24CLOUD: Cleanup in UploadFileClientHandlerAlexander Tkachev
Adds Client::noMoreContent() and Reader::noMoreContent(), which return true when whole client's request was read.
2016-08-24CLOUD: Add UploadFileClientHandlerAlexander Tkachev
Now Client reads the first headers block, then LocalWebserver decides which Handler to use. In case of "/upload", UploadFileHandler is used. But now it only knows the "path" parameter. If that's valid, actual UploadFileClientHandler is created, which reads the contents of the request and, when finds there an "upload_file" field, starts saving it in the directory specified by "path". With that we don't need temp files approach from Reader class.
2016-08-24CLOUD: Add UploadFileHandlerAlexander Tkachev
2016-08-24CLOUD: Fix minor Reader-related bugsAlexander Tkachev
2016-08-24CLOUD: Update Reader to delete temp filesAlexander Tkachev
2016-08-24CLOUD: Save files fields into temp filesAlexander Tkachev
Instead of keeping them in memory. Temp file name is generated to point into ScummVM's working directory. That means that if user wanted to upload file to the place with sufficient size, it would instead be uploaded to ScummVM's working directory. Yet it's too early to parse the target directory, so there is no way to generate temp file name within that directory.
2016-08-24CLOUD: Add Reader::readOneByteInStream()Alexander Tkachev
2016-08-24CLOUD: Determine file's name in POSTAlexander Tkachev
2016-08-24CLOUD: Move method/path/etc info in ReaderAlexander Tkachev
Query parameters are now parsed once and then just searched in the HashMap.
2016-08-24CLOUD: Use Reader in ClientAlexander Tkachev
Instead of copy-pasting it I'm just "integrating" it in.
2016-08-24CLOUD: Update Reader to support pausingAlexander Tkachev
That means that if current buffer is over, reader will stop reading and it's safe to call readResponse() again, so it would continue from the place it left.
2016-08-24CLOUD: Add Reader sketchAlexander Tkachev
That should be part of the Client, I guess. Reader is not ready to continue reading from place it stopped, but it already works as it should for the case when whole content is available.