Sat, 07 Nov 2026 22:18:05 UTC Log in
Processing HTTP Content-Type and Accept headers built by guoguo completed Wed, 14 Oct 2026 00:48:19 UTC

Description

This library is intended to be a comprehensive solution to parsing and selecting quality-indexed values in HTTP headers. It is capable of parsing both media types and language parameters from the Accept and Content header families, and can be extended to match against other accept headers as well. Selecting the appropriate header value is achieved by comparing a list of server options against the quality-indexed values supplied by the client. In the following example, the Accept header is parsed and then matched against a list of server options to serve the appropriate media using 'mapAcceptMedia': > getHeader >>= maybe send406Error sendResourceWith . mapAcceptMedia > [ ("text/html", asHtml) > , ("application/json", asJson) > ] Similarly, the Content-Type header can be used to produce a parser for request bodies based on the given content type with 'mapContentMedia': > getContentType >>= maybe send415Error readRequestBodyWith . mapContentMedia > [ ("application/json", parseJson) > , ("text/plain", parseText) > ] The API is agnostic to your choice of server.

RPMs

4 files, 3 arches
src
  • ghc-http-media-0.8.1.1-9.fc45.src.rpm 37.73 KB info · download
noarch
  • ghc-http-media-doc-0.8.1.1-9.fc45.noarch.rpm 72.91 KB info · download
riscv64
  • ghc-http-media-0.8.1.1-9.fc45.riscv64.rpm 69.56 KB info · download
  • ghc-http-media-devel-0.8.1.1-9.fc45.riscv64.rpm 150.87 KB info · download

Logs

riscv64

Changelog

* Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild

* Mon Jan 26 2026 Jens Petersen <petersen@redhat.com> - 0.8.1.1-8
- refresh to cabal-rpm-2.3.2

* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild

* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild

* Mon Apr 07 2025 Jens Petersen <petersen@redhat.com> - 0.8.1.1-5
- Rebuild

* Sun Mar 30 2025 Jens Petersen <petersen@redhat.com> - 0.8.1.1-4
- disable testsuite

* Sun Feb 23 2025 Jens Petersen <petersen@redhat.com> - 0.8.1.1-3
- cabal-rpm-2.3.0

* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild

* Sat Aug 03 2024 Jens Petersen <petersen@redhat.com> - 0.8.1.1-1
- https://hackage.haskell.org/package/http-media-0.8.1.1/changelog

* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0.0-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild