HTTP-Proxy
view release on metacpan or search on metacpan
- new built-in filter: HTTP::Proxy::BodyFilter::complete
that stores the message body in memory and passes it on to the
next filters only when it's complete
- logs have cleaner prefixes and the pid is always shown
- should work under 5.005_03 (Thanks to Mathieu Arnold)
- transparent proxying support (mostly to please Martin Zdila
and Paul Makepeace)
- push_filter() should now accept the query parameter
[FIXES]
- the FILTER constant is now named FILTERS
[BUGS]
- the proxy does not work under Win32, except if you force
maxchild to 0 (no forking at all).
- t/20dummy.t (and a few others) hanged under Win32
+ Ken Hirsch proposed a patch for HTTP::Daemon
(and a workaround for HTTP::Proxy's daemon object)
+ Bruno De Fraine tracked down the problem to the fork()
emulation by Windows threads under Win32 that lead to
a deadlock.
=> both explanations cover the same problem, which I haven't
been able to correct yet
- all the tests that fork a proxy and a server are therefore
skipped under Win32. This is ugly, and will change in the future.
[EXAMPLES]
- eg/rfc.pl - save rfc\d+\.txt files as we browse them
- eg/js.pl - save \.js files as we browse them
- eg/dragon.pl - enhance the Dragon Go Server web site
- eg/fudd.pl - make the web tawk wike Ewmer J. Fudd
- eg/switch.pl - switch proxies as you browse
- Changed all the examples so that they can take HTTP::Proxy::new()
parameters on the command-line (so, call them with logmask 3,
for example)
[DOCUMENTATION]
- documentation for the filter initialisation methods
- removed all references to the so-called "store-and-forward"
mechanism (see HTTP::Proxy::BodyFilter::complete)
0.13 Wed Mar 3 17:36:31 CET 2004
[ENHANCEMENTS]
- CONNECT support (but only transparently...)
- the client_headers() method (similar to hop_headers()) give
the filters access to the proxy's LWP::UA Client-* headers
- filters are applied on all supported methods by default
[FIXES]
- removed everything regarding control() and control_regex(),
which were not used and confusing
[TESTS]
- tests for CONNECT support
- tests for SSL support (not working yet)
[EXAMPLES]
- eg/adblock.pl - a very simple adblocker
- eg/trim.pl - trims whitespace from HTML pages
- eg/javascript.pl - add any text right after <body>
[DOCUMENTATION]
- separate COPYRIGHT and LICENSE sections in all man pages
0.12 Thu Jan 22 23:54:03 CET 2004
[ENHANCEMENTS]
- send the error message to the client when the Proxy agent dies
(usually because of a filter error)
- the proxy now sends a X-Forwarded-For header by default
(and the proxy method x_forwarded_for can toggle this)
- the proxy method client_socket() gives access to the socket
connected to the current client (the example in Changes for 0.10
was wrong: one can get the IP address of the connected agent from
inside a filter with $self->proxy->client_socket->peerhost)
[FIXES]
- do not block simultaneous connections when not forking
- clean up the filter chain after the body-request filters
- ensure the filter stack is reinitialised between requests
[TESTS]
- tests for X-Forwarded-For
- test the proxy against http://diveintomark.org/tests/client/http/
[EXAMPLES]
- eg/post.pl - outputs the URI and parameters of all POST requests
- eg/logger.pl - outputs details of GET and POST requests
0.11 Fri Jan 2 17:02:08 CET 2004
[ENHANCEMENTS]
- setting maxchild to 0 prevents forking (Jim Cromie)
- filters can now match on the query string
- hop-by-hop headers and Max-Forwards headers are correctly supported
- new mutators added to HTTP::Proxy: via, hop_headers, request,
response
- filters can now answer in place of the server, which allows
for authorisation filters, cache (?) filters, etc.
- new examples scripts: proxy-auth.pl
[FIXES]
- push_filter() now correctly supports several match criteria
[TESTS]
- all the Via: header tests are now in t/50via.t
- t/50standard.t now checks headers for several request types
- new tests:
+ t/51simple2.t - check response header filters with an actual proxy
+ t/61simple2.t - check response body filters with an actual proxy
[INTERNALS]
- new method _send_response_headers
0.10 Wed Nov 19 01:36:59 CET 2003
*** MAJOR INTERFACE CHANGES ***
- new base classes HTTP::Proxy::HeaderFilter and
HTTP::Proxy::BodyFilter
- some useful built-in filter classes:
HTTP::Proxy::BodyFilter::htmlparser
HTTP::Proxy::BodyFilter::htmltext
HTTP::Proxy::BodyFilter::lines
HTTP::Proxy::BodyFilter::simple
HTTP::Proxy::BodyFilter::tags
HTTP::Proxy::HeaderFilter::simple
HTTP::Proxy::HeaderFilter::standard
- tests for the internal class HTTP::Proxy::FilterStack
- tests for the built-in filters
- the examples are up-to-date with the new interface
- new/enhanced accessors:
+ the proxy host() attribute becomes actually useful: by default,
the proxy is only usable by local user-agents (the socket
is bound to localhost)
+ the filters proxy() accessor gives access to the proxy itself.
For example, one can get the IP address of the agent connected
to the proxy from inside a filter ($self->proxy->daemon->peerhost)
- many documentation changes
This version is NOT compatible with the previous ones
regarding the way filters work.
*** MAJOR INTERFACE CHANGES ***
0.09 Fri Aug 15 21:12:17 CEST 2003
- maxserve is now correctly handled
- corrected a bug in the t/20keepalive.t test file that
( run in 1.066 second using v1.01-cache-2.11-cpan-13bb782fe5a )