FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Plugins cannot route HTTP QUERY (RFC 10008) on Fastify 4 — lws10-index needs it · Issue #628 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub

Repository navigation

Plugins cannot route HTTP QUERY (RFC 10008) on Fastify 4 — lws10-index needs it #628

Closed as not planned

Description

Found while bringing lwsd up to the Oct 2026 LWS drafts (#621; lwsd CONFORMANCE.md C15).

Problem

lws10-index moved the Type Search Service to the HTTP QUERY method (RFC 10008, June 2026): the filter travels in the request body as application/lws-query+json. Node 24's parser accepts QUERY (http.METHODS includes it), but Fastify 4.29 has a fixed method list (lib/httpMethods.js) and 404s any other method before routing, so a plugin cannot register a route for it — there is no hook earlier than the router.

What lwsd does today

Prepends a listener on the raw http.Server that relabels a QUERY request as POST and remembers it in a WeakSet; the handler reports the real method. It works (Touchstone index 36/36) but it is the plugin reaching under the host.

Fix options

  1. Fastify 5 has fastify.addHttpMethod('QUERY', { hasBody: true }); lwsd already uses it when present. Upgrading is the clean fix and benefits everything else too.
  2. If the upgrade is not imminent: core calls addHttpMethod-equivalent at boot (Fastify 4 has no public API, so this would be the same relabel shim, once, in the host) and plugins' scope.route({ method: 'QUERY' }) just works.

Related: #206, #621.

Activity

  1. added
    enhancementNew feature or request
    pluginCould be implemented as a plugin (#206); core/plugin line defined in #564
    on Oct 14, 2026
  2. melvincarvalho commented on Oct 14, 2026

    ContributorAuthor

    WONTFIX: adding an HTTP method to the host (Fastify upgrade or a core-level relabel) is a can of worms for one plugin's search endpoint. lwsd keeps its own contained shim (prepended request listener, documented as CONFORMANCE.md C15) and that is where it stays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpluginCould be implemented as a plugin (#206); core/plugin line defined in #564

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL