All sorts of new crap and adjustments
This commit is contained in:
1 parent
5bd9e9ca21
commit
ff2c2b7432
84 files changed
+5935
-664
No files matched your search
+15
-16
@@ -3,22 +3,21 @@
|
||||
#include "IMFPlainText.h"
|
||||
|
||||
namespace coreutils {
|
||||
|
||||
IMFFormData::IMFFormData() {}
|
||||
|
||||
IMFFormData::IMFFormData(PString &in, std::string boundary) : IMFMultipart(in, boundary) {
|
||||
|
||||
}
|
||||
|
||||
std::string IMFFormData::getByName(std::string name) {
|
||||
std::string value;
|
||||
for(PString section: sections) {
|
||||
IMFMessage message(section);
|
||||
if(message.getHeaderKeyPairValue("Content-Disposition", "name") == name) {
|
||||
IMFPlainText *text = (IMFPlainText *)message.getBody();
|
||||
return text->toString();
|
||||
}
|
||||
|
||||
}
|
||||
return "";
|
||||
}
|
||||
IMFFormData::IMFFormData(ZString &in, ZString boundary) : IMFMultipart(in, boundary) {
|
||||
|
||||
}
|
||||
|
||||
IMFBody * IMFFormData::getByName(ZString name) {
|
||||
for(ZString section: sections) {
|
||||
IMFMessage message(section);
|
||||
if(message.getHeaderKeyPairValue((char *)"Content-Disposition", (char *)"name").equals(name)) {
|
||||
return message.getBody();
|
||||
}
|
||||
}
|
||||
return new IMFBody();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user