Function: eca-process--parse-header
eca-process--parse-header is a natively compiled function defined in
eca-process.el.
Signature
(eca-process--parse-header S)
Documentation
Parse string S as a ECA (KEY . VAL) header.
Source Code
;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-process.el
(defun eca-process--parse-header (s)
"Parse string S as a ECA (KEY . VAL) header."
(let ((pos (string-match "\:" s))
key val)
(unless pos
(signal 'eca-invalid-header-name (list s)))
(setq key (substring s 0 pos)
val (s-trim-left (substring s (+ 1 pos))))
(when (equal key "Content-Length")
(cl-assert (cl-loop for c across val
when (or (> c ?9) (< c ?0)) return nil
finally return t)
nil (format "Invalid Content-Length value: %s" val)))
(cons key val)))