Better HTTP - About

Started by admin, Sep 16, 2026, 11:27 AM

Previous topic - Next topic

admin

Better HTTP gives SMF a more reliable, modern outbound HTTP transport layer by preferring cURL, intelligently recovering across IPv4 and IPv6, and falling back to SMF's native socket path only when necessary.

Built for SMF 2.1.x, Better HTTP improves the reliability of server-side web requests used by SMF itself and by compatible MODs, while adding detailed diagnostics and privacy-safe observability so administrators can see exactly how outbound requests are being handled.

Features
  • cURL-first outbound HTTP/HTTPS
  • Uses cURL whenever available.
  • Preserves SMF's normal fetch_web_data() behavior for existing callers.
  • Intelligent IPv4 / IPv6 recovery
  • Starts with normal automatic address-family selection.
  • If a safe GET request encounters a genuine connection-class failure, Better HTTP can retry using the alternate IP family.
  • IPv4 and IPv6 connectivity can be tested independently from the admin panel.
  • Native SMF socket fallback
  • If cURL cannot complete the request, Better HTTP can fall back to SMF's existing fsockopen() transport.
  • Fallback behavior remains compatible with stock SMF.
  • Safer POST handling
  • POST requests are not automatically replayed across network families after uncertain failures.
  • If the remote server returns a real HTTP response such as 403, 404, or 500, Better HTTP records that response instead of incorrectly treating it as a transport failure and retrying the POST.
  • TLS verification
  • HTTPS requests use certificate and hostname verification.
  • TLS failures are not silently downgraded into less-strict retry paths.
  • Live connection diagnostics
  • Run a real IANA connection test from the admin panel.
  • Displays:
  • transport used
  • HTTP status
  • IPv4 or IPv6
  • remote server address
  • DNS lookup time
  • connection time
  • total request time
  • TLS status
  • fallback status
  • cURL errors
  • IPv4 / IPv6 reachability matrix
  • Independently tests:
  • automatic resolution
  • forced IPv4
  • forced IPv6
  • Controlled recovery testing
  • Safely simulates a failed primary cURL attempt to confirm alternate-family recovery works.
  • No DNS, firewall, routing, or server configuration changes are made.
  • Full fallback simulation
  • Safely exercises the complete transport ladder:
  • cURL attempt
  • alternate-family recovery
  • native SMF socket fallback
  • Useful for confirming how the server behaves when every cURL path is unavailable.
  • Real Request Observability
  • Tracks privacy-safe statistics for actual outbound SMF requests.
  • Includes:
  • total requests
  • cURL successes
  • IP-family recoveries
  • native socket fallbacks
  • socket connection failures
  • HTTP non-success responses
  • terminal Better HTTP failures
  • Recent request history
  • Stores the 20 most recent real outbound requests with:
  • target hostname
  • GET / POST
  • transport used
  • initial and final IP family
  • recovery status
  • HTTP status
  • duration
  • fallback status
  • result
  • Host activity summary
  • Shows recent request counts by hostname.
  • Includes average and slowest request times, recoveries, and fallbacks.
  • Slow request reporting
  • Highlights the slowest recent outbound requests for quick troubleshooting.
  • At-a-glance health information
  • Shows:
  • last real request
  • last IP-family recovery
  • last native socket fallback
  • last HTTP non-success response
  • last terminal failure
  • most active recent host
  • slowest recent request
  • Privacy-conscious diagnostics
  • Does not store:
  • full URLs
  • query strings
  • response bodies
  • POST contents
  • visitor IP addresses
  • member information
  • session data
  • remote server IP history
Installation and Upgrades

Better HTTP is installed through the normal SMF Package Manager.

RC1 supports direct upgrades from the current development builds, including dev7b.

The MOD applies a small, controlled modification to SMF's outbound HTTP path while keeping the main Better HTTP logic in its own source file.

Uninstall Behavior

Better HTTP follows the Better SMF uninstall standard.

Remove data unchecked:

Better HTTP files are removed.
SMF source modifications are reversed.
Integration hooks are removed.
Observability data and request history are preserved for a future reinstall.

Remove data checked:

Everything above is removed.
Better HTTP counters, history, and stored observability data are also deleted.

The release candidate has been validated to restore the modified SMF source file back to the stock version during uninstall.

Compatibility
SMF 2.1.x
PHP with cURL recommended
fsockopen() retained as native fallback where available
IPv6 support automatically detected
Why Better HTTP?

SMF already has a central outbound request system, but its stock behavior prefers raw socket connections before cURL.

Better HTTP reverses that priority and adds modern recovery, diagnostics, and visibility without requiring every MOD to implement its own HTTP client.

That means SMF and compatible Better SMF MODs can benefit from a more robust outbound networking layer automatically.

Better HTTP — make SMF's outbound connections more reliable, observable, and resilient.

Version: 1.0.0 RC1
Platform: SMF 2.1.x
Category: MODS → Technical
Having trouble? Please contact me through Help & Support Board.