worked on IMF smartbuffers.
This commit is contained in:
1 parent
3f0a541e80
commit
11f396a749
6 files changed
+72
-69
No files matched your search
+45
-1
@@ -3,8 +3,52 @@
|
||||
|
||||
namespace coreutils {
|
||||
|
||||
IMFMultipart::IMFMultipart() {}
|
||||
IMFMultipart::IMFMultipart(int fd, int length) {
|
||||
int ch = 0;
|
||||
int rc = 0;
|
||||
while((ch != '\r') && (ch != '\n')) {
|
||||
rc = ::read(fd, &ch, 1);
|
||||
--length;
|
||||
if((ch != '\r') && (ch != '\n'))
|
||||
boundary.write(ch);
|
||||
}
|
||||
if(ch == '\r') {
|
||||
rc = ::read(fd, &ch, 1);
|
||||
--length;
|
||||
}
|
||||
while(1) {
|
||||
sections.emplace_back(fd, boundary);
|
||||
rc = ::read(fd, &ch, 1);
|
||||
--length;
|
||||
if(ch == '-') {
|
||||
rc = ::read(fd, &ch, 1);
|
||||
--length;
|
||||
if(ch == '-') {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
rc = ::read(fd, &ch, 1);
|
||||
--length;
|
||||
if(ch == '\r') {
|
||||
rc = ::read(fd, &ch, 1);
|
||||
--length;
|
||||
if(ch == '\n') {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
IMFMultipart::IMFMultipart(ZString &in, ZString &boundary) {
|
||||
Log(LOG_DEBUG_1) << in;
|
||||
std::stringstream temp;
|
||||
|
||||
Reference in new issue
Block a user