PackageTrack
Sign in Get early access

nette/http

🌐 Nette Http: abstraction for HTTP request, response and session. Provides careful data sanitization and utility for URL and cookies manipulation.

v3.4.0 20M downloads/mo #1806 most downloaded on Packagist nette/http

What this package is like to depend on

Last release 2 months ago

13 Jun 2026

Ships fairly regularly

a new release about every 4 months

Rarely documented

notes for 10 of 60 stable releases

Nothing withdrawn

no release was ever pulled

12 years old

60 releases · first in 2014

3 releases in the last 12 months

see the full history below

Release timeline

60 releases · Jun 2014 to Jun 2026
2015 2017 2019 2021 2023 2025
Release Pre-release

Releases

latest 60
  1. v3.4.0 13 Jun 2026
    Release notes

    This release brings serious firepower to server-side HTTP handling. The headline is a brand-new SSRF defense kitIPAddress and UrlValidator let you validate URLs and pin connections before your app ever talks to an attacker-controlled host. On top of that, cookie handling gets a modern overhaul with a type-safe SameSite enum, CHIPS/Partitioned support, and a proper Max-Age attribute, while the new Request::isFrom() gives you reliable same-site request detection – even on Safari. Now on PHP 8.3.

    Changes

    • PHP 8.3 is now required. Time to upgrade your runtime if you haven't already.
    • UserStorage is gone – the long-deprecated class has been removed. Use the standard authentication storage instead.
    • Request::getRemoteHost() is deprecated and now returns null – reverse DNS lookups were slow, unreliable, and a privacy footgun. Resolve the hostname yourself from getRemoteAddress() if you really need it (#218).

    Deprecations (still working, but plan ahead)

    • The IResponse::SameSite* constants are deprecated in favor of the new SameSite enum.
    • Request::isSameSite() is deprecated – use isFrom() instead.
    • Passing integer 0 as the expiration to Response::setCookie() is deprecated – use null for a session cookie.

    ✨ New Features

    • SSRF protection, batteries included – the new IPAddress is an immutable IPv4/IPv6 value object with rich predicates (isPublic(), isPrivate(), isLoopback(), isLinkLocal(), isMulticast(), isReserved()), CIDR matching via isInRange(), and IPv4-mapped IPv6 normalization. Pair it with UrlValidator, a configurable guard that vets scheme, port, host allow/blocklists, userinfo, and – optionally with DNS – the resolved IP ranges. It even hands back the resolved IPs so you can pin the connection through CURLOPT_RESOLVE and defeat DNS-rebinding.
    • Request::isFrom() – a single, reliable way to check where a request came from, with site, dest, and user parameters built on the Sec-Fetch-* headers. For browsers without Sec-Fetch support (Safari < 16.4), it transparently falls back to a strict cookie, so same-site detection just works everywhere.
    • Type-safe SameSite enumsetCookie() and Session now accept a proper enum instead of magic strings, so typos become compile-time problems, not silent security holes.
    • Response::setCookie() speaks modern cookie – it now supports the Partitioned attribute (CHIPS) for third-party cookies, emits a Max-Age attribute (which takes precedence over expires and ignores the client clock), and forces Secure automatically when SameSite=None, sparing you a browser rejection.
    • Helpers::expirationToSeconds() – one consistent parser for every expiration value across the library. Numbers are relative seconds, while DateTimeInterface and textual strings like '20 minutes' or '2024-01-01' resolve as absolute times; each caller decides what null means in its own context.
    • Helpers::parseQualityList() – parses HTTP quality-value lists (Accept, Accept-Language, …) into a ranked token map. Request::detectLanguage() was rewritten on top of it and is more correct as a result.
    Open source →
  2. v3.3.4 26 May 2026
    Release notes
    • RequestFactory::setForceHttps() – force the request scheme to HTTPS regardless of the server environment, handy behind proxies and load balancers that don't advertise TLS termination. Also exposed via the DI config option http: forceHttps: true.
    • Request::getOrigin() now strictly follows RFC 6454 – returns null for any Origin header that isn't a bare scheme://host[:port] (e.g. headers containing a path are rejected instead of being silently accepted).
    • Improved phpDoc types and descriptions across the whole Nette\Http namespace – better IDE autocompletion and PHPStan inference for Request, Response, Session, Url and friends.
    Open source →
  3. v3.3.3 30 Oct 2025
    Release notes
    • support for PHP 8.5
    • optimized global function calls
    • Url, UrlImmutable: user & password are deprecated
    Open source →
  4. v3.3.2 12 Jan 2025
    Release notes
    • UrlImmutable, UrlScript: added resolve()
    • Url: added isAbsolute() & removeDotSegments()
    • UrlImmutable, UrlScript: removed build() method
    • Url::canonicalize() char " does not need to be encoded
    • Url, UrlImmutable: user & password are deprecated
    • FileUpload::__construct() accepts path
    • SessionPanel: convert templates to Latte-like syntax
    Open source →
  5. v3.3.1 04 Nov 2024
    Release notes
    • support for PHP 8.4
    • FileUpload::getSanitizedName() changes the extension only for image files #239
    • RequestFactory: extract port from x-forwarded-host (#230)
    • FileUpload: Initialize properties (#235)(#195)
    • Session: keep exceptions chain on session_start (#240)
    • Session: SessionSection class template annotation #225
    • IResponse: added DateTimeInterface to setCookie $expire param (#237)
    • readonly properties
    Open source →
  6. v3.3.0 30 Jan 2024
    Release notes
    • requires PHP 8.1
    • uses PHP 8.1 features
    Open source →
  7. v3.2.4 30 Jan 2024
    Release notes
    • FileUpload: added getSuggestedExtension()
    • RequestFactory: unify and fix host parsing (#229)
    Open source →
  8. v3.2.3 02 Nov 2023
    Release notes
    • support for PHP 8.3
    • FileUpload: detects supported images
    • RequestFactory: fixed port detection when HTTP_HOST & SERVER_PORT are used #223
    • removed fix for IE
    Open source →
  9. v3.2.2 18 Mar 2023
    Release notes
    • SessionExtension: don't set readAndClose if null (#213)
    • Improved https recognition behind load balancer (#221)
    • RequestFactory: fix X-Forwarded-Host mixup with remote host (#222)
    • RequestFactory: performance optimization #220
    • RequestFactory: fixed filter detection
    • Url: host can end with dot #198
    • added Session::getSectionNames(), replacement for getIterator()
    Open source →
  10. v3.2.1 05 Dec 2022

    Nothing published for this version

  11. v3.1.8 18 Mar 2023
    Release notes
    • SessionExtension: don't set readAndClose if null (#213)
    • Improved https recognition behind load balancer (#221)
    • RequestFactory: fix X-Forwarded-Host mixup with remote host (#222)
    • RequestFactory: performance optimization
    • RequestFactory: fixed filter detection
    • Url: host can end with dot #198
    Open source →
  12. v3.1.7 13 Oct 2022

    Nothing published for this version

  13. v3.1.6 02 Apr 2022

    Nothing published for this version

  14. v3.1.5 29 Nov 2021

    Nothing published for this version

  15. v3.1.2 25 Aug 2021

    Nothing published for this version

  16. v3.1.1 25 Jan 2021

    Nothing published for this version

  17. v3.1.0 04 Jan 2021

    Nothing published for this version

  18. v3.0.7 17 Sep 2021

    Nothing published for this version

  19. v3.0.6 25 Aug 2021

    Nothing published for this version

  20. v3.0.5 02 Nov 2020

    Nothing published for this version

  21. v3.0.4 31 Mar 2020

    Nothing published for this version

  22. v3.0.3 31 Oct 2019

    Nothing published for this version

  23. v3.0.2 08 Jul 2019

    Nothing published for this version

  24. v3.0.1 03 Apr 2019

    Nothing published for this version

  25. v3.0.0 28 Feb 2019

    Nothing published for this version

  26. v2.4.12 06 Nov 2020

    Nothing published for this version

  27. v2.4.11 13 Mar 2019

    Nothing published for this version

  28. v2.4.10 03 Sep 2018

    Nothing published for this version

  29. v2.4.9 26 Apr 2018

    Nothing published for this version

  30. v2.4.8 14 Mar 2018

    Nothing published for this version

  31. v2.4.7 24 Aug 2017

    Nothing published for this version

  32. v2.4.6 11 Jul 2017

    Nothing published for this version

  33. v2.4.5 16 Mar 2017

    Nothing published for this version

  34. v2.4.4 18 Jan 2017

    Nothing published for this version

  35. v2.4.3 19 Dec 2016

    Nothing published for this version

  36. v2.4.2 17 Oct 2016

    Nothing published for this version

  37. v2.4.1 27 Sep 2016

    Nothing published for this version

  38. v2.4.0 25 Jun 2016

    Nothing published for this version

  39. v2.3.9 16 Mar 2017

    Nothing published for this version

  40. v2.3.8 19 Dec 2016

    Nothing published for this version

  41. v2.3.7 06 Jun 2016

    Nothing published for this version

  42. v2.3.6 02 Apr 2016

    Nothing published for this version

  43. v2.3.5 01 Apr 2016

    Nothing published for this version

  44. v2.3.4 20 Jan 2016

    Nothing published for this version

  45. v2.3.3 19 Jul 2015

    Nothing published for this version

  46. v2.3.2 16 Jun 2015

    Nothing published for this version

  47. v2.3.1 08 Apr 2015

    Nothing published for this version

  48. v2.3.0 25 Feb 2015

    Nothing published for this version

  49. v2.2.10 02 Apr 2016

    Nothing published for this version

  50. v2.2.9 30 Mar 2016

    Nothing published for this version

  51. v2.2.8 19 Jul 2015

    Nothing published for this version

  52. v2.2.7 08 Apr 2015

    Nothing published for this version

  53. v2.2.6 20 Feb 2015

    Nothing published for this version

  54. v2.2.5 21 Dec 2014

    Nothing published for this version

  55. v2.2.4 16 Nov 2014

    Nothing published for this version

  56. v2.2.3 15 Nov 2014

    Nothing published for this version

  57. v2.2.2 08 Nov 2014

    Nothing published for this version

  58. v2.2.1 24 Aug 2014

    Nothing published for this version

  59. v2.2.0 24 Jun 2014

    Nothing published for this version

  60. v3.0.3.1 03 Jun 2020

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive