Changes for version 0.002010 - 2026-08-28
- Bug fixes
- h2: a receive() called after the request has been fully delivered now parks until the stream ends and resolves with http.disconnect -- matching h1 -- instead of synthesizing the terminal http.request event again on every call (which busy-looped the spec's own wait-for-disconnect receive pattern and left RST_STREAM invisible to a receive-based app). Same one-shot discipline the SSE closure already had. Pinned by t/http2/40-pending-io-at-disconnect.t.
- Specification conformance (PAGI 0.002006: core spec 0.5 / Www 0.4)
- Scopes report pagi.version '0.5' and, for http/websocket/sse, spec_version '0.4' -- the feature-detection gate for the new settlement contract, which this server already implemented. The lifespan scope keeps spec_version '0.3' (its sub-spec did not bump).
- New end-to-end conformance tests pin the settlement contract over real sockets on every protocol: a send parked on backpressure at abrupt disconnect resolves (never fails, never hangs), the resumed coroutine observes the completed state transition, on_disconnect is never invoked inside the application's send call frame, a pending receive resolves with the protocol's disconnect event, and h2 RST_STREAM settles per-stream I/O without cancelling the application Future (t/61-pending-io-at-disconnect.t, t/http2/40-pending-io-at-disconnect.t).
- Maintenance
- t/http2/36 builds its 20KB payload once, outside its send loop: a repeat-op inside a foreach that also awaits yields undef on later iterations under Future::AsyncAwait on ITHREADS perls (upstream bug, minimal reproducer reported; threads is the trigger -- DEBUGGING is not required -- so vendor threaded perls are affected too).
Documentation
PAGI application server
HTTP/1.1, HTTP/2, WebSocket, SSE, and Security Compliance Documentation
Modules
PAGI Reference Server Implementation
Normalizes PAGI 0.4 application providers to a coderef
Non-blocking file I/O for PAGI::Server internals
Per-connection state machine
Connection state tracking for HTTP requests
Mandatory outgoing-event validation
HTTP/1.1 protocol handler
HTTP/2 protocol handler using nghttp2
PAGI application loader and server runner
Outbound flow-control introspection for a connection
Provides
in lib/PAGI/Server/Protocol/HTTP2.pm
Examples
- examples/01-hello-http/README.md
- examples/01-hello-http/app.pl
- examples/02-streaming-response/README.md
- examples/02-streaming-response/app.pl
- examples/03-request-body/README.md
- examples/03-request-body/app.pl
- examples/04-websocket-echo/README.md
- examples/04-websocket-echo/app.pl
- examples/05-sse-broadcaster/README.md
- examples/05-sse-broadcaster/app.pl
- examples/06-lifespan-state/README.md
- examples/06-lifespan-state/app.pl
- examples/07-extension-fullflush/README.md
- examples/07-extension-fullflush/app.pl
- examples/08-tls-introspection/README.md
- examples/08-tls-introspection/app.pl
- examples/11-job-runner/README.md
- examples/11-job-runner/app.pl
- examples/11-job-runner/lib/JobRunner/HTTP.pm
- examples/11-job-runner/lib/JobRunner/Jobs.pm
- examples/11-job-runner/lib/JobRunner/Queue.pm
- examples/11-job-runner/lib/JobRunner/SSE.pm
- examples/11-job-runner/lib/JobRunner/WebSocket.pm
- examples/11-job-runner/lib/JobRunner/Worker.pm
- examples/11-job-runner/public/css/style.css
- examples/11-job-runner/public/index.html
- examples/11-job-runner/public/js/app.js
- examples/12-utf8/README.md
- examples/12-utf8/app.pl
- examples/README.md
- examples/backpressure-test/README.md
- examples/backpressure-test/app.pl
- examples/worker-pool-prototype.pl