Skip to content

Releases: al3x5dev/http

v1.4.0

08 Apr 05:06

Choose a tag to compare

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

15 Feb 15:32

Choose a tag to compare

Changelog

  • Changed normalizeMultipartValue to accept all scalar values (string, int, float, bool)
  • Only convert string paths that exist to CURLFile
  • Prevent false file detection for booleans or numeric values

v1.3.0

12 Feb 05:19

Choose a tag to compare

Changelog

Support for sending files using using multipart/form-data has been added; the following data types are accepted:

  • CurlFile
  • Mk4U\Http\Stream::class
  • resource
  • string

v1.2.2

22 Jan 04:06
6210bb6

Choose a tag to compare

Changelog

  • Fixed detailed response bugs and documentation was updated. (2db5c94)

v1.2.1

20 Jan 15:43

Choose a tag to compare

Changelog

v0.3.2

12 Nov 21:19
7d7a18d

Choose a tag to compare

What's Changed

  • Fixed params method by @alexsandrov16 in 3fab610

Full Changelog: v0.3.1...v0.3.2

v0.3.1

12 Nov 20:30

Choose a tag to compare

Changelog

  • Added support for flash message
  • Added session start options
  • Added delete method
  • Updated documentation

v0.2.6

15 Jul 15:12
7648d9f

Choose a tag to compare

Changelog

  • Fixed response methods:
    • Response::json()
    • Response::html()
    • Response::xml()
    • Response::plain()

v0.2.5

10 Jul 18:13

Choose a tag to compare

Changelog

  • XML response added

v0.2.4

04 Jul 19:34
c7c9934

Choose a tag to compare

Changelog

  • Translated exception messages
  • Added documentation