Cleanup ACE_HAS_PTHREAD_SIGMASK_PROTOTYPE, all platforms support it so far as I can...
[ACE_TAO.git] / ACE / apps / JAWS2 / HTTPU / http_response.cpp
blob3cf450c0b9b7313904a1baf9935ad45cb52aa038
1 #include "HTTPU/http_response.h"
3 void
4 HTTP_Response::parse_line ()
6 this->response_.init (this->line ());
7 if (this->response_.error () != Parse_HTTP_Response::HTTPU_OK)
8 this->status_ = STATUS_INTERNAL_SERVER_ERROR;
11 int
12 HTTP_Response::espouse_line ()
14 int count;
15 int status;
17 if (this->status_ != (int)STATUS_OK)
18 status = this->status_;
19 else
20 status = this->response_line ()->code ();
22 count = ACE_OS::sprintf (this->mb_->wr_ptr (), "%s %d %s\r\n",
23 "HTTP/1.1",
24 status,
25 (char *)(*HTTP_SCode::instance ())[status]);
26 // Last arg is hard coded since we are suppose to report the
27 // level of server we are, and not act like the level of the
28 // client. This information should be obtained from the config.
30 if (count < 0)
31 return -1;
33 this->mb_->wr_ptr (count);
34 return 0;
37 void
38 HTTP_Response::dump ()
40 ACE_DEBUG ((LM_DEBUG, "===== BEGIN entera_HTTP_Response::dump =====\n"));
41 HTTP_Base::dump ();
42 ACE_DEBUG ((LM_DEBUG, "===== END entera_HTTP_Response::dump =====\n"));
45 #if !defined (ACE_HAS_INLINED_OSCALLS)
46 # include "HTTPU/http_response.inl"
47 # endif /* ACE_HAS_INLINED_OSCALLS */