2018-07-27 Fred Gleason <fredg@paravelsystems.com>

* Added a 'SaveFile' test method to the web API.
	* Added a 'SaveString' test method to the web API.
	* Refactored the multipart-mime parser in 'RDFormPost' to process
	UTF-8 strings correctly.
This commit is contained in:
Fred Gleason
2018-07-27 14:28:55 -04:00
parent 046ddb0264
commit 542fb7d6a6
18 changed files with 429 additions and 138 deletions

View File

@@ -23,8 +23,10 @@
#include <map>
#include <qdatastream.h>
#include <qstring.h>
#include <qstringlist.h>
#include <qtextstream.h>
#include <qvariant.h>
#include <qhostaddress.h>
@@ -64,6 +66,7 @@ class RDFormPost
private:
void LoadUrlEncoding(char first);
void LoadMultipartEncoding(char first);
bool GetMimePart(QString *name,QString *value,bool *is_file);
QHostAddress post_client_address;
RDFormPost::Encoding post_encoding;
RDFormPost::Error post_error;
@@ -74,6 +77,10 @@ class RDFormPost
unsigned post_content_length;
QString post_content_type;
char *post_data;
QString post_separator;
FILE *post_stream;
QTextStream *post_text_reader;
};