-rw-r--r-- | src/cgi_gateway.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cgi_gateway.cc b/src/cgi_gateway.cc index 9b03639..af4e16d 100644 --- a/src/cgi_gateway.cc +++ b/src/cgi_gateway.cc | |||
@@ -2,49 +2,49 @@ | |||
2 | #include <ctype.h> | 2 | #include <ctype.h> |
3 | #include <cstdlib> | 3 | #include <cstdlib> |
4 | #include <cstring> | 4 | #include <cstring> |
5 | #include <sstream> | 5 | #include <sstream> |
6 | #include "kingate/cgi_gateway.h" | 6 | #include "kingate/cgi_gateway.h" |
7 | #include "kingate/util.h" | 7 | #include "kingate/util.h" |
8 | #include "kingate/exception.h" | 8 | #include "kingate/exception.h" |
9 | #include "config.h" | 9 | #include "config.h" |
10 | #ifdef HAVE_MIMETIC | 10 | #ifdef HAVE_MIMETIC |
11 | # include <mimetic/mimeentity.h> | 11 | # include <mimetic/mimeentity.h> |
12 | # include <mimetic/parser/itparser.h> | 12 | # include <mimetic/parser/itparser.h> |
13 | #endif /* HAVE_MIMETIC */ | 13 | #endif /* HAVE_MIMETIC */ |
14 | 14 | ||
15 | namespace kingate { | 15 | namespace kingate { |
16 | 16 | ||
17 | #ifdef HAVE_MIMETIC | 17 | #ifdef HAVE_MIMETIC |
18 | using mimetic::MimeEntity; | 18 | using mimetic::MimeEntity; |
19 | 19 | ||
20 | struct TornMimeEntity : public MimeEntity { | 20 | struct TornMimeEntity : public MimeEntity { |
21 | typedef istreambuf_iterator<char> it_type; | 21 | typedef istreambuf_iterator<char> it_type; |
22 | typedef it_type::iterator_category it_cat; | 22 | typedef it_type::iterator_category it_cat; |
23 | struct IParser : public mimetic::IteratorParser<it_type,it_cat> { | 23 | struct IParser : public mimetic::IteratorParser<it_type,it_cat> { |
24 | typedef mimetic::IteratorParser<it_type,it_cat> BT; | 24 | typedef mimetic::IteratorParser<it_type,it_cat> BT; |
25 | IParser(MimeEntity& me) | 25 | IParser(MimeEntity& me) |
26 | : BT::IteratorParser<it_type,it_cat>(me) { } | 26 | : IteratorParser<it_type,it_cat>(me) { } |
27 | void loadHeader(it_type bit,it_type eit) { | 27 | void loadHeader(it_type bit,it_type eit) { |
28 | m_bit = bit; m_eit = eit; | 28 | m_bit = bit; m_eit = eit; |
29 | BT::loadHeader(); | 29 | BT::loadHeader(); |
30 | } | 30 | } |
31 | void loadBody(it_type bit,it_type eit) { | 31 | void loadBody(it_type bit,it_type eit) { |
32 | m_bit = bit; m_eit = eit; | 32 | m_bit = bit; m_eit = eit; |
33 | BT::loadBody(); | 33 | BT::loadBody(); |
34 | } | 34 | } |
35 | }; | 35 | }; |
36 | void load(istream& hs,istream& bs,int mask=0) { | 36 | void load(istream& hs,istream& bs,int mask=0) { |
37 | IParser prs(*this); | 37 | IParser prs(*this); |
38 | prs.iMask(mask); | 38 | prs.iMask(mask); |
39 | prs.loadHeader(it_type(hs),it_type()); | 39 | prs.loadHeader(it_type(hs),it_type()); |
40 | prs.loadBody(it_type(bs),it_type()); | 40 | prs.loadBody(it_type(bs),it_type()); |
41 | } | 41 | } |
42 | }; | 42 | }; |
43 | #endif /* HAVE_MIMETIC */ | 43 | #endif /* HAVE_MIMETIC */ |
44 | 44 | ||
45 | static string empty_string; | 45 | static string empty_string; |
46 | 46 | ||
47 | cgi_gateway::basic_file_t::~basic_file_t() { } | 47 | cgi_gateway::basic_file_t::~basic_file_t() { } |
48 | 48 | ||
49 | class string_file_t : public cgi_gateway::basic_file_t { | 49 | class string_file_t : public cgi_gateway::basic_file_t { |
50 | public: | 50 | public: |