Changes for version 0.001012 - 2026-01-01

  • New Features
    • PAGI 0.2 specification: Loop-agnostic apps, SSE POST support, keepalive events
    • Send-side backpressure to prevent unbounded memory growth under slow clients
    • Configurable write_high_watermark (64KB) and write_low_watermark (16KB) matching Python asyncio defaults for optimal memory/throughput balance
    • SSE disconnect reasons (client_closed, timeout, write_error, shutdown)
  • Bug Fixes
    • Fix Lint middleware to preserve original app errors instead of masking them
    • Fix SSE keepalive to use chunked transfer encoding
    • Fix missing IO::Async::Timer::Periodic use statement
    • Fix missing 'method' field in SSE test scopes (per spec line 624)
    • Fix WebSocket scope incorrectly including 'method' field in test client
    • Fix middleware class resolution for nested namespaces (Auth::Basic, etc.) using ^ prefix for fully-qualified class names
  • Improvements
    • Improved event loop portability (Future::IO now fully optional)
    • Improve max_connections auto-detection using getrlimit(RLIMIT_NOFILE) instead of sysconf(_SC_OPEN_MAX) for accuracy
    • Add fd_headroom config option (default 100) for max_connections calculation
    • Add TTY warning at startup when access_log goes to terminal
    • Security fixes from code review
    • PAGI spec compliance fixes for event validation
  • Build/Distribution
    • Replace Markdown::Pod with App::sdview for spec POD generation
      • Fixes =item - to =item * (proper POD bullet points)
      • Converts module names to L<> links for metacpan

Documentation

PAGI application server
Recipes for Common PAGI Tasks
HTTP/1.1, WebSocket, and Security Compliance Documentation
PAGI Specification Documentation
PAGI Specification Documentation
PAGI Specification Documentation
PAGI Specification Documentation
A comprehensive guide to building async web applications with PAGI

Modules

Perl Asynchronous Gateway Interface
Try apps in sequence until success
Serve files with directory listing
Serve static files
Health check endpoint app
Load PAGI app from file
Customizable 404 response
HTTP reverse proxy (DEMO ONLY - NOT FOR PRODUCTION)
URL redirect app
Unified routing for HTTP, WebSocket, and SSE
Pub/sub Server-Sent Events
Rate-limited request processing
Mount apps at URL path prefixes
Pub/sub WebSocket broadcast
Multi-room chat application
Echo WebSocket messages back to sender
Execute CGI scripts as PAGI apps
PSGI-to-PAGI adapter
Class-based HTTP endpoint handler
Class-based router with wrapped handlers
Class-based Server-Sent Events endpoint handler
Class-based WebSocket endpoint handler
Wrap a PAGI app with lifecycle management
Base class for PAGI middleware
Request logging middleware
HTTP Basic Authentication middleware
Bearer token authentication middleware
DSL for composing PAGI middleware
Cross-Origin Resource Sharing middleware
Cross-Site Request Forgery protection middleware
Conditional GET/HEAD request handling
Auto Content-Length header middleware
HTTP content negotiation middleware
Cookie parsing middleware
Development debug panel middleware
ETag generation middleware
Exception handling middleware
Form request body parsing middleware
Response compression middleware
Force HTTPS redirect middleware
HEAD request handling middleware
Health check endpoint middleware
JSON request body parsing middleware
Validate PAGI application compliance
Serve maintenance page when enabled
Override HTTP method from request data
Request rate limiting middleware
Unique request ID middleware
Handle X-Forwarded-* headers from reverse proxies
URL rewriting middleware
Request timing middleware
Add retry hints to SSE events
Security headers middleware
Session management middleware
Static file serving middleware
Host header validation middleware
WebSocket per-message compression
Rate limiting for WebSocket connections
Delegate file serving to reverse proxy
Convenience wrapper for PAGI request scope
Streaming body consumption for PAGI requests
Async multipart/form-data parser
Content negotiation utilities for PAGI
Uploaded file representation
Fluent response builder for PAGI applications
PAGI application loader and server runner
Convenience wrapper for PAGI Server-Sent Events connections
PAGI Reference Server Implementation
Non-blocking file I/O for PAGI::Server internals
Per-connection state machine
Connection state tracking for HTTP requests
Dev-mode event field validation
HTTP/1.1 protocol handler
Test client for PAGI applications
HTTP response wrapper for testing
Server-Sent Events connection for testing PAGI applications
WebSocket connection for testing PAGI applications
Convenience wrapper for PAGI WebSocket connections

Provides

in lib/PAGI/App/WrapPSGI.pm
in lib/PAGI/Endpoint/Router.pm
in lib/PAGI/Middleware/Cookie.pm
in lib/PAGI/Response.pm

Examples