| Index: native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_pepper_interface_url_loader.cc
|
| diff --git a/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_pepper_interface_url_loader.cc b/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_pepper_interface_url_loader.cc
|
| index e209e398af0c74a2333ff32562edd22254891288..00ff72557c76f2b4fdcbd065b2d68b56d098b745 100644
|
| --- a/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_pepper_interface_url_loader.cc
|
| +++ b/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_pepper_interface_url_loader.cc
|
| @@ -5,7 +5,6 @@
|
| #include "fake_ppapi/fake_pepper_interface_url_loader.h"
|
|
|
| #include <string.h>
|
| -#include <strings.h>
|
|
|
| #include <algorithm>
|
| #include <sstream>
|
| @@ -17,38 +16,6 @@
|
|
|
| namespace {
|
|
|
| -bool GetHeaderValue(const std::string& headers,
|
| - const std::string& key,
|
| - std::string* out_value) {
|
| - out_value->clear();
|
| -
|
| - size_t offset = 0;
|
| - while (offset != std::string::npos) {
|
| - // Find the next colon; this separates the key from the value.
|
| - size_t colon = headers.find(':', offset);
|
| - if (colon == std::string::npos)
|
| - return false;
|
| -
|
| - // Find the newline; this separates the value from the next header.
|
| - size_t newline = headers.find('\n', offset);
|
| - if (strncasecmp(key.c_str(), &headers.data()[offset], key.size()) != 0) {
|
| - // Key doesn't match, skip to next header.
|
| - offset = newline;
|
| - continue;
|
| - }
|
| -
|
| - // Key matches, extract value. First, skip leading spaces.
|
| - size_t nonspace = headers.find_first_not_of(' ', colon + 1);
|
| - if (nonspace == std::string::npos)
|
| - return false;
|
| -
|
| - out_value->assign(headers, nonspace, newline - nonspace);
|
| - return true;
|
| - }
|
| -
|
| - return false;
|
| -}
|
| -
|
| class FakeInstanceResource : public FakeResource {
|
| public:
|
| FakeInstanceResource() : server_template(NULL) {}
|
| @@ -83,26 +50,6 @@ class FakeURLLoaderResource : public FakeResource {
|
| off_t read_end;
|
| };
|
|
|
| -class FakeURLRequestInfoResource : public FakeResource {
|
| - public:
|
| - FakeURLRequestInfoResource() {}
|
| - static const char* classname() { return "FakeURLRequestInfoResource"; }
|
| -
|
| - std::string url;
|
| - std::string method;
|
| - std::string headers;
|
| -};
|
| -
|
| -class FakeURLResponseInfoResource : public FakeResource {
|
| - public:
|
| - FakeURLResponseInfoResource() : status_code(0) {}
|
| - static const char* classname() { return "FakeURLResponseInfoResource"; }
|
| -
|
| - int status_code;
|
| - std::string url;
|
| - std::string headers;
|
| -};
|
| -
|
| void HandleContentLength(FakeURLLoaderResource* loader,
|
| FakeURLResponseInfoResource* response,
|
| FakeURLLoaderEntity* entity) {
|
|
|