Packages / Fedora 44 / Source / ghc-http-media

Source Package: ghc-http-media (0.8.1.1-8.fc44)

Processing HTTP Content-Type and Accept headers

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.

Package information

Homepage
[https://hackage.haskell.org/package/http-media]
License
MIT
Downstream-Paketbetreuer
dsheaObserved Nov 20, 2026 [source]

The following binary packages are built from this source package:

Bekannte Sicherheitslücken

Keine passenden Meldungen in den erfassten Quellen.

Zuletzt synchronisiert:

[CVE-Katalog]

Quellen

  • Authoritative source; repository metadata signature verified

    Signaturnachweis

    44-everything-aarch64:ad124f8125666e9059d7a8180427bdaea80f6286f71140457e5c7edd95883eee

    Repository-signature verification record
    Signed-object SHA-256
    236514c32119ab3c85b81fbb9e5e9d92b07aeba0d19d64c9b4fc9117a1863769
    Keyring revision
    RPM-GPG-KEY-fedora-44-primary
    SHA-256 93642aec521a1e5e96dd715f7ae0ec0850ebc9de09a94ce03cae5263f26cc18a
    Tool and policy
    1
    openfactory-software-catalog-signature-v1
    Verification time
    Sep 1, 2026
    Repository metadata hash linkage
    Result
    Recorded as verified; digest details unavailable
  • Authoritative source; repository metadata signature verified

    Signaturnachweis

    44-everything-x86_64:da3845427d188097f6fd71b417a039bdfb8efefc4f38ca44b5cbb94f95a18991

    Repository-signature verification record
    Signed-object SHA-256
    1300b99ac5d04b5561ad901320c8bd59ed1553f4971c3ce2ca48c40242c66676
    Keyring revision
    RPM-GPG-KEY-fedora-44-primary
    SHA-256 93642aec521a1e5e96dd715f7ae0ec0850ebc9de09a94ce03cae5263f26cc18a
    Tool and policy
    1
    openfactory-software-catalog-signature-v1
    Verification time
    Sep 1, 2026
    Repository metadata hash linkage
    Result
    Recorded as verified; digest details unavailable
  • Curated source

    Source observation

    58c9d374bd00b7d29599f0194ec3b0df45a3cdc0fb8d7352b2a2bf869a32237e

    No repository signature was supplied for this metadata.