Releases: al3x5dev/http
Releases · al3x5dev/http
v1.4.0
Changelog
🚀 New Features
- Response: File Download Methods
- download() - Forced file download
- file() - Display file in browser (inline)
- streamDownload() - Download from stream (large files)
- guessMimeType() - Automatic MIME type detection
- Session: Integrated CSRF Protection
- csrfToken() - Generates CSRF token
- csrfField() - Generates hidden HTML input
- validateCsrf() - Validates a token
- validateRequestCsrf() - Validates the current request token
- Client: HTTP Client Improvements
- curl_reset() - cURL handle reuse
- New options: base_uri, auth, proxy, sink, allow_redirects, debug
- Typed exceptions: ClientException, ConnectException, TimeoutException, RequestException
- UploadedFile: Security and functionality improvements
- ASCII filename validation
- getStream() - Get file as Stream
- getExtension() - Extract extension
- getBasename() - Extract name without extension
- isMoved() - Check if moved
- Cookie: Security Improvements
- escaped() - Get cookies with XSS protection (ENT_QUOTES | ENT_HTML5)
- SameSite support (Strict, Lax, None)
- Cookie name validation
🔧 Improvements and Bug Fixes
- Request/Response: PSR-7 Improvements
- Improved PSR-7 compatibility
- Removal of unnecessary cloning
- Uri: RFC-compliant improvements
- Constructor with parameters
- fromString() - Create URI from string
- getQueryToArray() - Query as array
- getAuthority() - RFC-compliant
- getUserInfo() - User information
- Headers: Improvements
- getHeaderLine() - Header as concatenated string
- CRLF sanitization (prevents HTTP Response Splitting)
- getHeader() returns an array
- Stream: Improvements
- Null checks and operation validation
- Detached stream handling
- Support for w+b mode (php://memory)
- Session: Improvements
- pull() - Get and delete
- flush() - Delete all data
- requireSession() - Consistent verification
- Improved Flash message lifecycle
📚 Documentation
- Updated complete documentation for all classes
- CSRF documentation, downloads, and additional methods
v1.3.1
v1.3.0
v1.2.2
v1.2.1
Changelog
-
Added
-
Updated
new Request()now allows to simulate requests, to capture the real request useRequest::create(). (b273f85)- Documentation. (https://github.com/alexsandrov16/http/tree/main/docs)
-
Fixed