# # spec file for package perl-HTTP-Proxy # # Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define cpan_name HTTP-Proxy Name: perl-HTTP-Proxy Version: 0.304.0 Release: 0 # 0.304 -> normalize -> 0.304.0 %define cpan_version 0.304 License: Artistic-1.0 OR GPL-1.0-or-later Summary: Pure Perl HTTP proxy URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/B/BO/BOOK/%{cpan_name}-%{cpan_version}.tar.gz Source1: cpanspec.yml Source100: README.md BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(HTML::Parser) >= 3 BuildRequires: perl(HTTP::Daemon) BuildRequires: perl(HTTP::Date) BuildRequires: perl(HTTP::Headers) BuildRequires: perl(HTTP::Headers::Util) BuildRequires: perl(HTTP::Request) BuildRequires: perl(HTTP::Request::Common) BuildRequires: perl(LWP::ConnCache) BuildRequires: perl(LWP::UserAgent) Requires: perl(HTTP::Daemon) Requires: perl(HTTP::Date) Requires: perl(HTTP::Headers::Util) Requires: perl(LWP::ConnCache) Requires: perl(LWP::UserAgent) Provides: perl(HTTP::Proxy) = %{version} Provides: perl(HTTP::Proxy::BodyFilter) = %{version} Provides: perl(HTTP::Proxy::BodyFilter::complete) = %{version} Provides: perl(HTTP::Proxy::BodyFilter::htmlparser) = %{version} Provides: perl(HTTP::Proxy::BodyFilter::htmltext) = %{version} Provides: perl(HTTP::Proxy::BodyFilter::lines) = %{version} Provides: perl(HTTP::Proxy::BodyFilter::save) = %{version} Provides: perl(HTTP::Proxy::BodyFilter::simple) = %{version} Provides: perl(HTTP::Proxy::BodyFilter::tags) = %{version} Provides: perl(HTTP::Proxy::Engine) = %{version} Provides: perl(HTTP::Proxy::Engine::Legacy) = %{version} Provides: perl(HTTP::Proxy::Engine::NoFork) = %{version} Provides: perl(HTTP::Proxy::Engine::ScoreBoard) = %{version} Provides: perl(HTTP::Proxy::Engine::Threaded) = %{version} Provides: perl(HTTP::Proxy::FilterStack) = %{version} Provides: perl(HTTP::Proxy::HeaderFilter) = %{version} Provides: perl(HTTP::Proxy::HeaderFilter::simple) = %{version} Provides: perl(HTTP::Proxy::HeaderFilter::standard) = %{version} %undefine __perllib_provides %{perl_requires} %description This module implements an HTTP proxy, using an HTTP::Daemon to accept client connections, and an LWP::UserAgent to ask for the requested pages. The most interesting feature of this proxy object is its ability to filter the HTTP requests and responses through user-defined filters. Once the proxy is created, with the 'new()' method, it is possible to alter its behaviour by adding so-called "filters." This is done by the 'push_filter()' method. Once the filter is ready to run, it can be launched, with the 'start()' method. This method does not normally return until the proxy is killed or otherwise stopped. An important thing to note is that the proxy is (except when running the 'NoFork' engine) a _forking_ proxy: it doesn't support passing information between child processes, and you can count on reliable information passing only during a single HTTP connection (request + response). %prep %autosetup -n %{cpan_name}-%{cpan_version} %build perl Makefile.PL INSTALLDIRS=vendor %make_build %check make test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %files -f %{name}.files %doc Changes README %license LICENSE %changelog