OCaml HTTP cookie handling library with support for Eio-based storage jars

release prep

+60 -8
+17 -2
.gitignore
··· 1 - _build 2 - .*.swp 1 + # OCaml build artifacts 2 + _build/ 3 + *.install 4 + *.merlin 5 + 6 + # Third-party sources (fetch locally with opam source) 7 + third_party/ 8 + 9 + # Editor and OS files 10 + .DS_Store 11 + *.swp 12 + *~ 13 + .vscode/ 14 + .idea/ 15 + 16 + # Opam local switch 17 + _opam/
+5 -1
.tangled/workflows/build.yml
··· 26 26 - bzip2 27 27 - gcc 28 28 - ocaml 29 + - pkg-config 29 30 30 31 steps: 31 32 - name: opam 32 33 command: | 33 - opam init --disable-sandboxing -any 34 + opam init --disable-sandboxing -a -y 35 + - name: repo 36 + command: | 37 + opam repo add aoah https://tangled.org/anil.recoil.org/aoah-opam-repo.git 34 38 - name: switch 35 39 command: | 36 40 opam install . --confirm-level=unsafe-yes --deps-only
+5
bin/cookeiocat.ml
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 1 6 let () = 2 7 Eio_main.run @@ fun env -> 3 8 let args = Sys.argv in
+3 -2
cookeio.opam
··· 7 7 authors: ["Anil Madhavapeddy"] 8 8 license: "ISC" 9 9 homepage: "https://tangled.sh/@anil.recoil.org/ocaml-cookeio" 10 + doc: "https://tangled.sh/@anil.recoil.org/ocaml-cookeio" 10 11 bug-reports: "https://tangled.sh/@anil.recoil.org/ocaml-cookeio/issues" 11 12 depends: [ 12 13 "ocaml" {>= "5.2.0"} 13 - "dune" {>= "3.20"} 14 - "logs" {>= "0.9.0"} 14 + "dune" {>= "3.20" & >= "3.20"} 15 + "logs" {>= "0.10.0"} 15 16 "ptime" {>= "1.1.0"} 16 17 "eio_main" 17 18 "alcotest" {with-test}
+5 -3
dune-project
··· 9 9 (homepage "https://tangled.sh/@anil.recoil.org/ocaml-cookeio") 10 10 (maintainers "Anil Madhavapeddy <anil@recoil.org>") 11 11 (bug_reports "https://tangled.sh/@anil.recoil.org/ocaml-cookeio/issues") 12 + (documentation "https://tangled.sh/@anil.recoil.org/ocaml-cookeio") 12 13 (maintenance_intent "(latest)") 13 14 14 15 (package ··· 17 18 (description "Cookeio provides cookie parsing and serialization for OCaml applications. It handles parsing Set-Cookie and Cookie headers with full support for all cookie attributes.") 18 19 (depends 19 20 (ocaml (>= 5.2.0)) 20 - dune 21 - (logs (>= 0.9.0)) 21 + (dune (>= 3.20)) 22 + (logs (>= 0.10.0)) 22 23 (ptime (>= 1.1.0)) 23 24 eio_main 24 - (alcotest :with-test))) 25 + (alcotest :with-test) 26 + (odoc :with-doc)))
+5
lib/core/cookeio.ml
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 1 6 let src = Logs.Src.create "cookeio" ~doc:"Cookie management" 2 7 3 8 module Log = (val Logs.src_log src : Logs.LOG)
+5
lib/core/cookeio.mli
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 1 6 (** Cookie management library for OCaml 2 7 3 8 HTTP cookies are a mechanism that allows "server side connections to store
+5
lib/jar/cookeio_jar.ml
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 1 6 let src = Logs.Src.create "cookie_jar" ~doc:"Cookie jar management" 2 7 3 8 module Log = (val Logs.src_log src : Logs.LOG)
+5
lib/jar/cookeio_jar.mli
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 1 6 (** Cookie jar for storing and managing HTTP cookies. 2 7 3 8 This module provides a complete cookie jar implementation following
+5
test/test_cookeio.ml
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 1 6 open Cookeio 2 7 open Cookeio_jar 3 8