History log of /openbmc/bmcweb/http/routing/ruleparametertraits.hpp (Results 1 – 2 of 2)
Revision Date Author Comments
# a3b9eb98 03-Jun-2024 Ed Tanous <ed@tanous.net>

Make SSE pass

Redfish protocol validator is failing SSE. This is due to a clause in
the Redfish specification that requires a "json" error to be returned
when the SSE URI is hit with a standard req

Make SSE pass

Redfish protocol validator is failing SSE. This is due to a clause in
the Redfish specification that requires a "json" error to be returned
when the SSE URI is hit with a standard request.

In what exists today, we return 4XX (method not allowed) but because
this is handled by the HTTP layer, it's not possible to return the
correct Redfish payloads for when that 4XX happens within the Redfish
tree, because there is in fact a route that matches, that route just
doesn't support the type that we need.

This commit rearranges the router such that there are now 4 classes of
rules.

1. "verb" rules. These are GET/POST/PATCH type, and they are stored
using the existing PerMethod array index.
2. "upgrade" rules. These are for websocket or SSE routes that we
expect to upgrade to another route
3. 404 routes. These are called in the case where no route exists with
that given URI pattern, and no routes exist in the table for any
verb.
4. 405 method not allowed. These are called in the case where routes
exist in the tree for some method, but not for the method the user
requested.

To accomplish this, some minor refactors are implemented to separate out
the 4xx handlers to be their own variables, rather than just existing at
an index at the end of the verb table. This in turn means that
getRouteByIndex now changes to allow getting the route by PerMethod
instance, rather than index.

Tested:
unit tests pass (okish coverage)
Redfish protocol validator passes (with the exception of #277, which
fails identically before and after). SSE tests now pass.
Redfish service validator passes.

Change-Id: I555c50f392cb12ecbc39fbadbae6a3d50f4d1b23
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...


# 08bbe119 06-Apr-2023 Ed Tanous <edtanous@google.com>

Break up router into separate files

The router is a giant behemoth. Start breaking it down into pieces.

Tested: Redfish service validator passes.

Signed-off-by: Ed Tanous <edtanous@google.com>
Ch

Break up router into separate files

The router is a giant behemoth. Start breaking it down into pieces.

Tested: Redfish service validator passes.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I9d04f53a58ffce3ecbd88dded1aa6e9648d2a762

show more ...