Diffstat (limited to 'include/sitecing/sitecing_interface_cgi.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | include/sitecing/sitecing_interface_cgi.h | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/include/sitecing/sitecing_interface_cgi.h b/include/sitecing/sitecing_interface_cgi.h index cab947c..da538d6 100644 --- a/include/sitecing/sitecing_interface_cgi.h +++ b/include/sitecing/sitecing_interface_cgi.h | |||
@@ -36,7 +36,15 @@ namespace sitecing { | |||
36 | /** | 36 | /** |
37 | * Here is where we prebuffer output. | 37 | * Here is where we prebuffer output. |
38 | */ | 38 | */ |
39 | ostringstream prebuffer; | 39 | stringbuf prebuffer; |
40 | /** | ||
41 | * Output stream, initially going to prebuffer. | ||
42 | */ | ||
43 | ostream outs; | ||
44 | /** | ||
45 | * Have headers been sent yet? | ||
46 | */ | ||
47 | bool headers_flushed; | ||
40 | /** | 48 | /** |
41 | * Pointer to the sitespace object. | 49 | * Pointer to the sitespace object. |
42 | */ | 50 | */ |
@@ -48,13 +56,26 @@ namespace sitecing { | |||
48 | sitecing_interface_cgi(sitespace *s); | 56 | sitecing_interface_cgi(sitespace *s); |
49 | 57 | ||
50 | /** | 58 | /** |
51 | * @todo TODO: wish I could remember -- document me. | 59 | * Set up interface for the (possibly, new) cgi gateway object, |
60 | * reset headers, empty buffer, etc. | ||
52 | */ | 61 | */ |
53 | void prepare(kingate::cgi_gateway *cg); | 62 | void prepare(kingate::cgi_gateway *cg); |
54 | /** | 63 | /** |
55 | * @todo TODO: wish I could remember -- document me. | 64 | * Flush output stream. |
65 | */ | ||
66 | void flush(bool keep_buffering=false); | ||
67 | /** | ||
68 | * Send headers to the output stream, if we haven't yet. | ||
69 | */ | ||
70 | void flush_headers(); | ||
71 | /** | ||
72 | * Are we buffering now? | ||
73 | */ | ||
74 | bool is_buffering(); | ||
75 | /** | ||
76 | * Control output buffering. | ||
56 | */ | 77 | */ |
57 | void flush(); | 78 | void set_buffering(bool do_buffer); |
58 | 79 | ||
59 | }; | 80 | }; |
60 | } | 81 | } |