Delete unused HTTP server code

There were remnants of use in proxy_unittest.cc, instantiating an
HttpListenServer but not using it for anything.

Also trim down httpcommon.h, the only function still in use is
HttpAuthenticate.

Bug: webrtc:6424
Change-Id: I9b122dedd6e8c923ed7bc721a336fe54192328c4
Reviewed-on: https://webrtc-review.googlesource.com/102141
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24884}
This commit is contained in:
Niels Möller
2018-09-26 16:18:38 +02:00
committed by Commit Bot
parent 371781435a
commit 83da552062
11 changed files with 5 additions and 2525 deletions

View File

@ -11,7 +11,6 @@
#include <memory>
#include <string>
#include "rtc_base/gunit.h"
#include "rtc_base/httpserver.h"
#include "rtc_base/proxyserver.h"
#include "rtc_base/socketadapters.h"
#include "rtc_base/testclient.h"
@ -24,18 +23,14 @@ using rtc::SocketAddress;
static const SocketAddress kSocksProxyIntAddr("1.2.3.4", 1080);
static const SocketAddress kSocksProxyExtAddr("1.2.3.5", 0);
static const SocketAddress kHttpsProxyIntAddr("1.2.3.4", 443);
static const SocketAddress kHttpsProxyExtAddr("1.2.3.5", 0);
static const SocketAddress kBogusProxyIntAddr("1.2.3.4", 999);
// Sets up a virtual socket server and HTTPS/SOCKS5 proxy servers.
// Sets up a virtual socket server and a SOCKS5 proxy server.
class ProxyTest : public testing::Test {
public:
ProxyTest() : ss_(new rtc::VirtualSocketServer()), thread_(ss_.get()) {
socks_.reset(new rtc::SocksProxyServer(ss_.get(), kSocksProxyIntAddr,
ss_.get(), kSocksProxyExtAddr));
https_.reset(new rtc::HttpListenServer());
https_->Listen(kHttpsProxyIntAddr);
}
rtc::SocketServer* ss() { return ss_.get(); }
@ -44,8 +39,6 @@ class ProxyTest : public testing::Test {
std::unique_ptr<rtc::SocketServer> ss_;
rtc::AutoSocketServerThread thread_;
std::unique_ptr<rtc::SocksProxyServer> socks_;
// TODO: Make this a real HTTPS proxy server.
std::unique_ptr<rtc::HttpListenServer> https_;
};
// Tests whether we can use a SOCKS5 proxy to connect to a server.