mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-09-17 17:00:27 +02:00
2021-06-01 Fred Gleason <fredg@paravelsystems.com>
* Cleaned up compile warnings in 'lib/rdformpost.cpp'. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
f1a90e957a
commit
88572c4c08
@ -1 +0,0 @@
|
||||
fredg@frozone.3298:1622508567
|
@ -21774,3 +21774,5 @@
|
||||
* Cleaned up compile warnings in 'lib/rddownload.cpp'.
|
||||
2021-06-01 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Cleaned up a compile warning in 'lib/rdevent_line.cpp'.
|
||||
2021-06-01 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Cleaned up compile warnings in 'lib/rdformpost.cpp'.
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Handle data from an HTML form.
|
||||
//
|
||||
// (C) Copyright 2009-2020 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2009-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -97,7 +97,7 @@ RDFormPost::RDFormPost(RDFormPost::Encoding encoding,unsigned maxsize,
|
||||
// (Perhaps) autodetect the encoding type
|
||||
//
|
||||
char first[2];
|
||||
read(0,first,1);
|
||||
RDCheckExitCode("RDFormPost::RDFormPost read",read(0,first,1));
|
||||
if(post_encoding==RDFormPost::AutoEncoded) {
|
||||
if(first[0]=='-') {
|
||||
post_encoding=RDFormPost::MultipartEncoded;
|
||||
@ -690,7 +690,8 @@ bool RDFormPost::GetMimePart(QString *name,QString *value,bool *is_file)
|
||||
data=GetLine();
|
||||
line=QString::fromUtf8(data).trimmed();
|
||||
while(!line.contains(post_separator)) {
|
||||
write(fd,data,data.length());
|
||||
RDCheckExitCode("RDFormPost::GetMimePart write",
|
||||
write(fd,data,data.length()));
|
||||
data=GetLine();
|
||||
line=QString::fromUtf8(data).trimmed();
|
||||
}
|
||||
@ -705,7 +706,9 @@ bool RDFormPost::GetMimePart(QString *name,QString *value,bool *is_file)
|
||||
}
|
||||
|
||||
if(fd>=0) {
|
||||
ftruncate(fd,lseek(fd,0,SEEK_CUR)-2); // Remove extraneous final CR/LF
|
||||
// Remove extraneous final CR/LF
|
||||
RDCheckExitCode("RDFormPost::GetMimePart ftruncate",
|
||||
ftruncate(fd,lseek(fd,0,SEEK_CUR)-2));
|
||||
close(fd);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user