diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-07-31 16:14:11 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-07-31 16:14:11 +0000 |
commit | 9c2ec3049a5634f1c916d792e81fc80edb669ea8 (patch) | |
tree | 0d634e179761581cadbffe852e7f9a9f049b5c6e /apps/JAWS2/HTTPU/parse_http_response.cpp | |
parent | 6540653cf736840d5aad719c73a8e43a549080be (diff) | |
download | ATCD-9c2ec3049a5634f1c916d792e81fc80edb669ea8.tar.gz |
This commit was manufactured by cvs2svn to create tag 'TAO-1_4_2'.TAO-1_4_2
Diffstat (limited to 'apps/JAWS2/HTTPU/parse_http_response.cpp')
-rw-r--r-- | apps/JAWS2/HTTPU/parse_http_response.cpp | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/apps/JAWS2/HTTPU/parse_http_response.cpp b/apps/JAWS2/HTTPU/parse_http_response.cpp deleted file mode 100644 index f3a195d1935..00000000000 --- a/apps/JAWS2/HTTPU/parse_http_response.cpp +++ /dev/null @@ -1,74 +0,0 @@ -// $Id$ - -#include "HTTPU/parse_http_response.h" -#include "ace/OS_NS_string.h" -#include "ace/OS_NS_stdlib.h" - -Parse_HTTP_Response::Parse_HTTP_Response (const char *response) - : code_ (200), - code_str_ (0), - major_version_ (0), - minor_version_ (9), - version_ (0), - response_ (0), - error_ (0) -{ - if (response != 0) - this->init (response); -} - -Parse_HTTP_Response::~Parse_HTTP_Response (void) -{ - if (this->response_) - ACE_OS::free (this->response_); - this->response_ = 0; - this->code_str_ = 0; - this->version_ = 0; -} - -void -Parse_HTTP_Response::init (const char *response) -{ - this->response_ = ACE_OS::strdup (response); - if (this->response_ == 0) - { - this->error_ = NO_MEMORY; - return; - } - - int n = ::sscanf (this->response_, "HTTP/%d.%d %d %*s", - &(this->major_version_), - &(this->minor_version_), - &(this->code_)); - - if (n == 3) - { - char *p = this->response_; - - while (*p == ' ' || *p == '\t') - p++; - - this->version_ = p++; - - while (*p != ' ' && *p != '\t') - p++; - - *p++ = '\0'; - - while (*p == ' ' || *p == '\t') - p++; - - this->code_str_ = p; - - while (*p && !ACE_OS::strchr (" \t\r\n", *p)) - p++; - - *p++ = '\0'; - } - else - this->error_ = BAD_RESPONSE; -} - -#if !defined (ACE_HAS_INLINED_OSCALLS) -# include "HTTPU/parse_http_response.i" -#endif /* ACE_HAS_INLINED_OS_CALLS */ |