HTTP section migration#446
Conversation
Adds reference_versioned_docs/version-v4/http/ with four pages: - overview.md: architecture, threading model, protocols served - configuration.md: full http section config reference - tls.md: top-level tls section reference (shared by HTTP and MQTT) - api.md: server global API (server.http, Request/Response, server.ws, etc.) Also adds migration-context/link-placeholders/http-link-placeholders.md and updates the v4 sidebar and migration map status. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-docs.stage.harperfabric.com/pr-446 This preview will update automatically when you push new commits. |
|
|
||
| ## `server.http(listener, options)` | ||
|
|
||
| Alias: `server.request` |
There was a problem hiding this comment.
Is this legacy? Can't say I'm a fan of using request() to register an http handler so much so that maybe we don't advertise the alias?
There was a problem hiding this comment.
This was definitely not designed to be an alias. server.request is supposed to specifically handle only HTTP requests, whereas server.http is supposed to handle both HTTP request and (HTTP upgrades to) WebSocket connections. It appears that is not working though. So yeah, I agree let's not advertise this until it is fixed (or something).
|
|
||
| ## `server.http(listener, options)` | ||
|
|
||
| Alias: `server.request` |
There was a problem hiding this comment.
This was definitely not designed to be an alias. server.request is supposed to specifically handle only HTTP requests, whereas server.http is supposed to handle both HTTP request and (HTTP upgrades to) WebSocket connections. It appears that is not working though. So yeah, I agree let's not advertise this until it is fixed (or something).
| ```javascript | ||
| class Origin { | ||
| async get(request) { | ||
| this.getContext().requestContext.sendEarlyHints('<link rel="preload" href="/my-resource" as="fetch">'); |
There was a problem hiding this comment.
This is interesting. This seems like a more complicated example than necessary. But also this is highlighting a good use case for early hints.
There was a problem hiding this comment.
You wrote this example yourself! https://docs.harperdb.io/docs/reference/globals#request :)
|
|
||
| ## Multi-Domain Certificates (SNI) | ||
|
|
||
| To serve different certificates for different domains using Server Name Indication (SNI), define `tls` as an array of configuration objects. Each entry can optionally include a `host` property specifying which domain it applies to. If `host` is omitted, the certificate's common name is used. |
There was a problem hiding this comment.
the certificate's common name and subject alternate names (SANs).
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-docs.stage.harperfabric.com/pr-446 This preview will update automatically when you push new commits. |
🧹 Preview CleanupThe preview deployment for this PR has been removed. |
Summary
reference_versioned_docs/version-v4/http/with four new pages: Overview, Configuration, TLS, and APIreference_versioned_sidebars/version-v4-sidebars.jsonwith the HTTP categoryv4-docs-migration-map.mdstatus to In Progress for all three HTTP entriesmigration-context/link-placeholders/http-link-placeholders.mdtracking 9 cross-section TODO linksFiles Created
reference_versioned_docs/version-v4/http/overview.md— Architecture, threading model (SO_REUSEPORT), protocols served, HTTP/2, compression, loggingreference_versioned_docs/version-v4/http/configuration.md— FullhttpYAML section reference with all optionsreference_versioned_docs/version-v4/http/tls.md— Top-leveltlssection (shared by HTTP, MQTT, sockets), SNI multi-cert, Operations API overridereference_versioned_docs/version-v4/http/api.md—serverglobal:server.http(),Request/Response,server.ws(),server.upgrade(),server.socket(),server.authenticateUser(),server.resources,contentTypes, etc.Source Files Used
versioned_docs/version-4.7/deployments/configuration.md(primary for configuration and TLS)versioned_docs/version-4.7/reference/globals.md(primary for API)release-notes/v4-tucker/4.1.0.md,4.2.0.md,4.3.0.md,4.5.0.md,4.6.0.md,4.7.0.mdVersion Annotations Added
High Confidence (confirmed via release notes)
http.compressionThreshold: v4.2.0http.mtls: v4.3.0http.http2: v4.5.0server.authenticateUser: v4.5.0http.logging: v4.6.0http.mtls.certificateVerification(OCSP): v4.7.0Link Placeholders Created
See
migration-context/link-placeholders/http-link-placeholders.mdfor the full list.Summary:
security/overviewconfiguration/overviewandconfiguration/operationsrest/overview,analytics/overview,operations-api/overview,resources/global-apisChecklist for Human Reviewer
🤖 Generated with Claude Code