From: Adam Dickmeiss Date: Fri, 21 Jun 2013 12:51:07 +0000 (+0200) Subject: http_rewrite: HTMLParser boilerplate X-Git-Tag: v1.3.59~51 X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;h=4a14f732154658bbd097d833089f968d77568ebd;p=metaproxy-moved-to-github.git http_rewrite: HTMLParser boilerplate --- diff --git a/src/filter_http_rewrite.cpp b/src/filter_http_rewrite.cpp index 4a35bad..3adc7db 100644 --- a/src/filter_http_rewrite.cpp +++ b/src/filter_http_rewrite.cpp @@ -21,6 +21,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include #include "filter_http_rewrite.hpp" +#include "html_parser.hpp" #include #include @@ -63,7 +64,7 @@ namespace metaproxy_1 { RulePtr rule; }; - class HttpRewrite::Phase { + class HttpRewrite::Phase : public HTMLParserEvent { public: std::list within_list; void rewrite_reqline(mp::odr & o, Z_HTTP_Request *hreq, @@ -73,6 +74,14 @@ namespace metaproxy_1 { void rewrite_body(mp::odr & o, char **content_buf, int *content_len, std::map & vars) const; + void openTagStart(const char *name); + void anyTagEnd(const char *name); + void attribute(const char *tagName, + const char *name, + const char *value, + int val_len); + void closeTag(const char *name); + void text(const char *value, int len); }; } } @@ -212,6 +221,32 @@ void yf::HttpRewrite::Phase::rewrite_body(mp::odr & o, } } + +void yf::HttpRewrite::Phase::openTagStart(const char *name) +{ +} + +void yf::HttpRewrite::Phase::anyTagEnd(const char *name) +{ +} + +void yf::HttpRewrite::Phase::attribute(const char *tagName, + const char *name, + const char *value, + int val_len) +{ +} + + +void yf::HttpRewrite::Phase::closeTag(const char *name) +{ +} + +void yf::HttpRewrite::Phase::text(const char *value, int len) +{ +} + + /** * Tests pattern from the vector in order and executes recipe on the first match.