Line
Link Here
|
0 |
-- a/libproxy/extension_config.hpp |
0 |
++ b/libproxy/extension_config.hpp |
Lines 31-37
using namespace libmodman;
Link Here
|
31 |
class DLL_PUBLIC config_extension : public extension<config_extension> { |
31 |
class DLL_PUBLIC config_extension : public extension<config_extension> { |
32 |
public: |
32 |
public: |
33 |
// Abstract methods |
33 |
// Abstract methods |
34 |
virtual vector<url> get_config(const url &dst) throw (runtime_error)=0; |
34 |
virtual vector<url> get_config(const url &dst)=0; |
35 |
|
35 |
|
36 |
// Virtual methods |
36 |
// Virtual methods |
37 |
virtual string get_ignore(const url &dst); |
37 |
virtual string get_ignore(const url &dst); |
38 |
-- a/libproxy/extension_pacrunner.cpp |
38 |
++ b/libproxy/extension_pacrunner.cpp |
Lines 30-36
pacrunner_extension::~pacrunner_extension() {
Link Here
|
30 |
if (this->pr) delete this->pr; |
30 |
if (this->pr) delete this->pr; |
31 |
} |
31 |
} |
32 |
|
32 |
|
33 |
pacrunner* pacrunner_extension::get(string pac, const url& pacurl) throw (bad_alloc) { |
33 |
pacrunner* pacrunner_extension::get(string pac, const url& pacurl) { |
34 |
if (this->pr) { |
34 |
if (this->pr) { |
35 |
if (this->last == pac) |
35 |
if (this->last == pac) |
36 |
return this->pr; |
36 |
return this->pr; |
37 |
-- a/libproxy/extension_pacrunner.hpp |
37 |
++ b/libproxy/extension_pacrunner.hpp |
Lines 26-32
Link Here
|
26 |
#define PX_PACRUNNER_MODULE_EZ(name, symb, smod) \ |
26 |
#define PX_PACRUNNER_MODULE_EZ(name, symb, smod) \ |
27 |
class name ## _pacrunner_extension : public pacrunner_extension { \ |
27 |
class name ## _pacrunner_extension : public pacrunner_extension { \ |
28 |
protected: \ |
28 |
protected: \ |
29 |
virtual pacrunner* create(string pac, const url& pacurl) throw (bad_alloc) { \ |
29 |
virtual pacrunner* create(string pac, const url& pacurl) { \ |
30 |
return new name ## _pacrunner(pac, pacurl); \ |
30 |
return new name ## _pacrunner(pac, pacurl); \ |
31 |
} \ |
31 |
} \ |
32 |
}; \ |
32 |
}; \ |
Lines 41-53
class DLL_PUBLIC pacrunner {
Link Here
|
41 |
public: |
41 |
public: |
42 |
pacrunner(string pac, const url& pacurl); |
42 |
pacrunner(string pac, const url& pacurl); |
43 |
virtual ~pacrunner() {}; |
43 |
virtual ~pacrunner() {}; |
44 |
virtual string run(const url& url) throw (bad_alloc)=0; |
44 |
virtual string run(const url& url)=0; |
45 |
}; |
45 |
}; |
46 |
|
46 |
|
47 |
class DLL_PUBLIC pacrunner_extension : public extension<pacrunner_extension, true> { |
47 |
class DLL_PUBLIC pacrunner_extension : public extension<pacrunner_extension, true> { |
48 |
public: |
48 |
public: |
49 |
// Virtual methods |
49 |
// Virtual methods |
50 |
virtual pacrunner* get(string pac, const url& pacurl) throw (bad_alloc); |
50 |
virtual pacrunner* get(string pac, const url& pacurl); |
51 |
virtual ~pacrunner_extension(); |
51 |
virtual ~pacrunner_extension(); |
52 |
|
52 |
|
53 |
// Final methods |
53 |
// Final methods |
Lines 55-61
public:
Link Here
|
55 |
|
55 |
|
56 |
protected: |
56 |
protected: |
57 |
// Abstract methods |
57 |
// Abstract methods |
58 |
virtual pacrunner* create(string pac, const url& pacurl) throw (bad_alloc)=0; |
58 |
virtual pacrunner* create(string pac, const url& pacurl)=0; |
59 |
|
59 |
|
60 |
private: |
60 |
private: |
61 |
pacrunner* pr; |
61 |
pacrunner* pr; |
62 |
-- a/libproxy/modules/config_envvar.cpp |
62 |
++ b/libproxy/modules/config_envvar.cpp |
Lines 24-30
using namespace libproxy;
Link Here
|
24 |
|
24 |
|
25 |
class envvar_config_extension : public config_extension { |
25 |
class envvar_config_extension : public config_extension { |
26 |
public: |
26 |
public: |
27 |
vector<url> get_config(const url &dst) throw (runtime_error) { |
27 |
vector<url> get_config(const url &dst) { |
28 |
const char *proxy = NULL; |
28 |
const char *proxy = NULL; |
29 |
vector<url> response; |
29 |
vector<url> response; |
30 |
|
30 |
|
31 |
-- a/libproxy/modules/config_sysconfig.cpp |
31 |
++ b/libproxy/modules/config_sysconfig.cpp |
Lines 124-130
public:
Link Here
|
124 |
~sysconfig_config_extension() { |
124 |
~sysconfig_config_extension() { |
125 |
} |
125 |
} |
126 |
|
126 |
|
127 |
vector<url> get_config(const url &dst) throw (runtime_error) { |
127 |
vector<url> get_config(const url &dst) { |
128 |
map<string,string>::const_iterator it = _data.find("PROXY_ENABLED"); |
128 |
map<string,string>::const_iterator it = _data.find("PROXY_ENABLED"); |
129 |
vector<url> response; |
129 |
vector<url> response; |
130 |
|
130 |
|
131 |
-- a/libproxy/url.cpp |
131 |
++ b/libproxy/url.cpp |
Lines 115-121
string url::encode(const string &data, const string &valid_reserved) {
Link Here
|
115 |
return encoded.str(); |
115 |
return encoded.str(); |
116 |
} |
116 |
} |
117 |
|
117 |
|
118 |
url::url(const string &url) throw(parse_error) |
118 |
url::url(const string &url) |
119 |
: m_orig(url), m_port(0), m_ips(NULL) { |
119 |
: m_orig(url), m_port(0), m_ips(NULL) { |
120 |
size_t idx = 0; |
120 |
size_t idx = 0; |
121 |
size_t hier_part_start, hier_part_end; |
121 |
size_t hier_part_start, hier_part_end; |
Lines 298-304
url& url::operator=(const url& url) {
Link Here
|
298 |
return *this; |
298 |
return *this; |
299 |
} |
299 |
} |
300 |
|
300 |
|
301 |
url& url::operator=(string strurl) throw (parse_error) { |
301 |
url& url::operator=(string strurl) { |
302 |
url tmp(strurl); |
302 |
url tmp(strurl); |
303 |
*this = tmp; |
303 |
*this = tmp; |
304 |
return *this; |
304 |
return *this; |
305 |
-- a/libproxy/url.hpp |
305 |
++ b/libproxy/url.hpp |
Lines 50-59
public:
Link Here
|
50 |
|
50 |
|
51 |
~url(); |
51 |
~url(); |
52 |
url(const url& url); |
52 |
url(const url& url); |
53 |
url(const string& url) throw (parse_error); |
53 |
url(const string& url); |
54 |
bool operator==(const url& url) const; |
54 |
bool operator==(const url& url) const; |
55 |
url& operator=(const url& url); |
55 |
url& operator=(const url& url); |
56 |
url& operator=(string url) throw (parse_error); |
56 |
url& operator=(string url); |
57 |
|
57 |
|
58 |
string get_host() const; |
58 |
string get_host() const; |
59 |
sockaddr const* const* get_ips(bool usedns); |
59 |
sockaddr const* const* get_ips(bool usedns); |