26 #ifndef http_response_h
27 #define http_response_h
51 extern void close_temp(FILE *s,
const string &name);
64 vector<string> *d_headers;
76 throw InternalErr(__FILE__, __LINE__,
"Unimplemented assignment");
97 HTTPResponse(FILE *s,
int status, vector<string> *h,
const string &temp_file)
98 :
Response(s, status), d_headers(h), d_file(temp_file)
100 DBG(cerr <<
"Headers: " << endl);
101 DBGN(copy(d_headers->begin(), d_headers->end(),
102 ostream_iterator<string>(cerr,
"\n")));
103 DBGN(cerr <<
"end of headers." << endl);
111 DBG(cerr <<
"Freeing HTTPConnect resources (" + d_file +
")... ");
118 delete d_headers; d_headers = 0;
150 #endif // http_response_h
virtual void set_stream(FILE *s)
virtual void set_file(const string &n)
virtual void set_headers(vector< string > *h)
HTTPResponse(FILE *s, int status, vector< string > *h, const string &temp_file)
A class for software fault reporting.
void close_temp(FILE *s, const string &name)
HTTPResponse(const HTTPResponse &rs)
virtual string get_file() const
HTTPResponse & operator=(const HTTPResponse &)
virtual vector< string > * get_headers() const
virtual FILE * get_stream() const