/* DBOX Module Copyright (C) 1994-2000 Daniel Kroening Purpose: */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include "ostatus.h" #include "webgetrfc.h" #include "webtools.h" #include "attachment.h" void parse_attachment(ostream &out, const string &attachment, const rfcmessaget &rfcm, const mimestructt &mimestruct) { if(attachment=="") { //out << "HTTP/1.0 200 Keep cool\r\n"; //out << "\r\n"; out << "HTTP/1.0 200 Keep cool\r\n" "MIME-Version: 1.0\r\n" "Server: DBOX-WWW Interface\r\n" "Content-Type: " << mimeheader2str(mimestruct.content_type) << "\r\n" "Content-Encoding: binary\r\n"; string data=mime_decode(mimestruct, rfcm); out << "Content-Location: test\r\n"; out << "Content-Lenght: " << data.size() << "\r\n"; out << "\r\n"; out << data; } else { unsigned nr=atoi(attachment.c_str())-1; if(nr