significant work on cookies and cgi formdata variables.
This commit is contained in:
1 parent
bd5223ca36
commit
9cd8381845
6 files changed
+37
-62
No files matched your search
+8
-16
@@ -1,28 +1,24 @@
|
||||
#include "IMFMultipart.h"
|
||||
#include "Log.h"
|
||||
#include "Exception.h"
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
namespace coreutils {
|
||||
|
||||
IMFMultipart::IMFMultipart(int fd, MString boundary) {
|
||||
int ch = 0;
|
||||
char ch = 0;
|
||||
int rc = 0;
|
||||
std::cout << "020" << std::endl;
|
||||
while((ch != '\r') && (ch != '\n')) {
|
||||
rc = ::read(fd, &ch, 1);
|
||||
if((ch != '\r') && (ch != '\n'))
|
||||
std::cout << (char)ch;
|
||||
boundary.write(ch);
|
||||
}
|
||||
if(ch == '\r') {
|
||||
std::cout << std::endl;
|
||||
rc = ::read(fd, &ch, 1);
|
||||
}
|
||||
while(1) {
|
||||
std::cout << "021: " << boundary << std::endl;
|
||||
IMFFormData *formData = new IMFFormData(fd, boundary);
|
||||
std::cout << "022" << std::endl;
|
||||
|
||||
rc = ::read(fd, &ch, 1);
|
||||
if(ch == '-') {
|
||||
@@ -30,16 +26,12 @@ namespace coreutils {
|
||||
if(ch == '-') {
|
||||
break;
|
||||
}
|
||||
} else if(ch == '\r') {
|
||||
rc = ::read(fd, &ch, 1);
|
||||
if(ch != '\n')
|
||||
coreutils::Exception("expecting '\n' in data stream.");
|
||||
}
|
||||
|
||||
}
|
||||
rc = ::read(fd, &ch, 1);
|
||||
if(ch == '\r') {
|
||||
rc = ::read(fd, &ch, 1);
|
||||
if(ch == '\n') {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user