mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-16 23:51:20 +02:00
2023-05-31 Fred Gleason <fredg@paravelsystems.com>
* Fixed a regression in 'RDFormPost' that caused the last character of the last variable in the post to be truncated when using 'application/x-www-form-urlencoded' encoding. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -24192,3 +24192,7 @@
|
|||||||
* Fixed uninitiated variables in rdairplay(1).
|
* Fixed uninitiated variables in rdairplay(1).
|
||||||
2023-05-30 Fred Gleason <fredg@paravelsystems.com>
|
2023-05-30 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Incremented the package version to 4.0.0rc3int1.
|
* Incremented the package version to 4.0.0rc3int1.
|
||||||
|
2023-05-31 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Fixed a regression in 'RDFormPost' that caused the last character
|
||||||
|
of the last variable in the post to be truncated when using
|
||||||
|
'application/x-www-form-urlencoded' encoding.
|
||||||
|
@@ -414,6 +414,50 @@ QString RDFormPost::headerContentType() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QByteArray RDFormPost::rawPost() const
|
||||||
|
{
|
||||||
|
return QByteArray(post_data,post_bytes_downloaded);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString RDFormPost::parsedPost() const
|
||||||
|
{
|
||||||
|
QString ret="";
|
||||||
|
|
||||||
|
ret+="<table cellpadding=\"5\" cellspacing=\"0\" border=\"1\">\n";
|
||||||
|
ret+="<tr>\n";
|
||||||
|
ret+="<td colspan=\"3\" align=\"center\"><strong>RDFormPost Data Dump</strong></td>\n";
|
||||||
|
ret+="</tr>\n";
|
||||||
|
|
||||||
|
ret+="<tr>\n";
|
||||||
|
ret+="<th align=\"center\">NAME</th>\n";
|
||||||
|
ret+="<th align=\"center\">VALUE</th>\n";
|
||||||
|
ret+="<th align=\"center\">FILE</th>\n";
|
||||||
|
ret+="</tr>\n";
|
||||||
|
|
||||||
|
for(QMap<QString,QVariant>::const_iterator ci=post_values.begin();
|
||||||
|
ci!=post_values.end();ci++) {
|
||||||
|
ret+="<tr>\n";
|
||||||
|
|
||||||
|
ret+=QString::asprintf("<td align=\"left\">|%s|</td>\n",ci.key().toUtf8().constData());
|
||||||
|
ret+=QString::asprintf("<td align=\"left\">|%s|</td>\n",
|
||||||
|
ci.value().toString().toUtf8().constData());
|
||||||
|
|
||||||
|
if(post_filenames[ci.key()]) {
|
||||||
|
ret+="<td align=\"center\">Yes</td>\n";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ret+="<td align=\"center\">No</td>\n";
|
||||||
|
}
|
||||||
|
ret+="</tr>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
ret+="</table>\n";
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void RDFormPost::dump()
|
void RDFormPost::dump()
|
||||||
{
|
{
|
||||||
printf("Content-type: text/html\n\n");
|
printf("Content-type: text/html\n\n");
|
||||||
@@ -576,7 +620,7 @@ void RDFormPost::LoadUrlEncoding(char first)
|
|||||||
total_read+=n;
|
total_read+=n;
|
||||||
}
|
}
|
||||||
|
|
||||||
post_data[total_read]=0;
|
post_data[total_read+1]=0;
|
||||||
lines=QString(post_data).split("&");
|
lines=QString(post_data).split("&");
|
||||||
|
|
||||||
for(int i=0;i<lines.size();i++) {
|
for(int i=0;i<lines.size();i++) {
|
||||||
|
@@ -58,6 +58,8 @@ class RDFormPost
|
|||||||
QString tempDir() const;
|
QString tempDir() const;
|
||||||
unsigned headerContentLength() const;
|
unsigned headerContentLength() const;
|
||||||
QString headerContentType() const;
|
QString headerContentType() const;
|
||||||
|
QByteArray rawPost() const;
|
||||||
|
QString parsedPost() const;
|
||||||
void dump();
|
void dump();
|
||||||
void dumpRawPost();
|
void dumpRawPost();
|
||||||
static QString errorString(RDFormPost::Error err);
|
static QString errorString(RDFormPost::Error err);
|
||||||
|
Reference in New Issue
Block a user