1 #include "HTTPU/http_request.h"
2 #include "HTTPU/parse_http_request.h"
5 HTTP_Request::parse_line ()
7 this->status_
= STATUS_OK
;
9 this->request_
.init (this->line ());
10 if (this->request_
.error () != Parse_HTTP_Request::HTTPU_OK
)
12 this->status_
= STATUS_INTERNAL_SERVER_ERROR
;
15 if (this->request_
.major_version () == 0)
17 this->no_headers_
= 1;
21 this->url_
.init (this->request_
.url ());
22 if (this->url_
.error () != 0)
23 this->status_
= STATUS_INTERNAL_SERVER_ERROR
;
27 HTTP_Request::espouse_line ()
31 if (this->request_
.major_version () == 0)
33 count
= ACE_OS::sprintf (this->mb_
->wr_ptr (), "%s /%s\r\n\r\n",
34 this->request_
.method_str (),
35 this->url_
.url_path ());
40 this->mb_
->wr_ptr (count
);
45 count
= ACE_OS::sprintf (this->mb_
->wr_ptr (), "%s /%s %s\r\n",
46 this->request_
.method_str (),
47 this->url_
.url_path (),
48 this->request_
.version ());
53 this->mb_
->wr_ptr (count
);
55 if (this->url_
.host () != 0)
57 JAWS_Header_Data
*hd
= this->headers ()->find ("Host");
60 count
= ACE_OS::sprintf (this->mb_
->wr_ptr (), "Host: %s\r\n",
66 this->mb_
->wr_ptr (count
);
76 ACE_DEBUG ((LM_DEBUG
, "===== BEGIN entera_HTTP_Request::dump =====\n"));
78 this->request_
.dump ();
79 ACE_DEBUG ((LM_DEBUG
, "===== END entera_HTTP_Request::dump =====\n"));
82 #if !defined (ACE_HAS_INLINED_OSCALLS)
83 # include "HTTPU/http_request.inl"
84 # endif /* ACE_HAS_INLINED_OSCALLS */