2019-09-30 10:52:49 -04:00
|
|
|
Name: http-parser
|
2020-06-23 15:30:49 +08:00
|
|
|
Version: 2.9.4
|
2022-07-25 15:02:20 +08:00
|
|
|
Release: 2
|
2019-09-30 10:52:49 -04:00
|
|
|
Summary: HTTP request/response parser for C
|
|
|
|
|
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: https://github.com/nodejs/%{name}
|
|
|
|
|
Source0: https://github.com/nodejs/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
|
|
|
|
|
|
2022-07-25 15:02:20 +08:00
|
|
|
Patch6000: backport-url-treat-empty-port-as-default.patch
|
|
|
|
|
|
2019-09-30 10:52:49 -04:00
|
|
|
BuildRequires: gcc meson
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
http-parser parses the HTTP request headers and body. As such, it acts as
|
|
|
|
|
a barrier in the policy to guarantee that the entire content has been received
|
|
|
|
|
before any other filters are invoked.The parser filter forces the server
|
|
|
|
|
to do "store-and-forward" routing instead of the default "cut-through" routing,
|
|
|
|
|
where the request is only parsed on-demand. This filter can be used as a simple test
|
|
|
|
|
to ensure that the message is XML, for example.
|
|
|
|
|
|
|
|
|
|
Features:
|
|
|
|
|
|
|
|
|
|
* No dependencies
|
|
|
|
|
* Handles persistent streams (keep-alive)
|
|
|
|
|
* Decodes chunked encoding
|
|
|
|
|
* Upgrade support
|
|
|
|
|
* Defends against buffer overflow attacks
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
|
Summary: Development headers and static libraries
|
2020-01-15 05:44:01 +08:00
|
|
|
Requires: %{name} = %{version}-%{release}
|
2019-09-30 10:52:49 -04:00
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
|
Development headers and static libraries for http-parser.
|
|
|
|
|
|
|
|
|
|
%package_help
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -n %{name}-%{version} -p1
|
|
|
|
|
|
|
|
|
|
cat > meson.build << EOF
|
|
|
|
|
project('%{name}', 'c',
|
|
|
|
|
version : '%{version}',
|
|
|
|
|
license: 'MIT')
|
|
|
|
|
|
|
|
|
|
install_headers('http_parser.h')
|
|
|
|
|
foreach x : [['http_parser', ['-DHTTP_PARSER_STRICT=0']],
|
|
|
|
|
['http_parser_strict', ['-DHTTP_PARSER_STRICT=1']]]
|
|
|
|
|
|
|
|
|
|
lib = library(x.get(0), 'http_parser.c', c_args : x.get(1),
|
|
|
|
|
version : '%{version}', install : true)
|
|
|
|
|
|
|
|
|
|
test('test-@0@'.format(x.get(0)),
|
|
|
|
|
executable('test-@0@'.format(x.get(0)), 'test.c',
|
|
|
|
|
c_args : x.get(1), link_with : lib),
|
|
|
|
|
timeout : 60)
|
|
|
|
|
endforeach
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%meson
|
|
|
|
|
%meson_build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%meson_install
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%meson_test
|
|
|
|
|
%ldconfig_scriptlets
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%license LICENSE*
|
|
|
|
|
%{_libdir}/*.so.*
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%{_includedir}/*.h
|
|
|
|
|
%{_libdir}/*.so
|
|
|
|
|
|
|
|
|
|
%files help
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%doc AUTHORS README.md
|
|
|
|
|
|
|
|
|
|
%changelog
|
2022-07-25 15:02:20 +08:00
|
|
|
* Mon Jul 25 2022 yanglu <yanglu72@h-partners.com> - 2.9.4-2
|
|
|
|
|
- Include patch to work colon but no port
|
|
|
|
|
|
2020-06-23 15:30:49 +08:00
|
|
|
* Tue Jun 23 2020 hanzhijun <hanzhijun1@huawei.com> - 2.9.4-1
|
|
|
|
|
- update to 2.9.4
|
|
|
|
|
|
2020-01-15 05:44:01 +08:00
|
|
|
* Wed Jan 15 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.9.2-2
|
|
|
|
|
- optimization the patch
|
|
|
|
|
|
2019-09-30 10:52:49 -04:00
|
|
|
* Sat Aug 31 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.9.2-1
|
|
|
|
|
- Package init
|