| commit | adee9f2e5b9e371a7e9bf9c817a340982658b341 | [log] [tgz] |
|---|---|---|
| author | Khang D Nguyen <khangng@os.amperecomputing.com> | Mon Sep 29 10:10:56 2025 +0700 |
| committer | khangng <khangng@os.amperecomputing.com> | Wed Oct 01 03:20:07 2025 +0000 |
| tree | e2666fdbb93865755f55239d2f3cd89a17cb5921 | |
| parent | a36b9458b814a68e6e6c8045b7f33e2642b9ae7c [diff] |
account_service: Remove success body on 204 response
Currently, PATCH requests updating Password to
/redfish/v1/AccountService/Accounts/{username} will return non-empty
body despite the status code is 204 No Content:
```
curl -X PATCH --user root:0penBmc -H "Content-Type: application/json" --insecure https://${BMC_IP}/redfish/v1/AccountService/Accounts/user_test01 -d '{"Password": "0penBmc"}'
```
```
Sep 29 02:45:09 mtmitchell-dcscm bmcwebd[947]: [http_response.hpp:212] 0x1bce918 Response content provided but code was no-content or not_modified, which aren't allowed to have a body for url : "/redfish/v1/AccountService/Accounts/user_test01"
```
This fixes the issue by removing the success body.
Tested: PATCH requests now do not create the error log.
Signed-off-by: Khang D Nguyen <khangng@os.amperecomputing.com>
Change-Id: I6a6a6964eed4b9ef591f59b5223cc24b9b82680f
This component attempts to be a "do everything" embedded webserver for OpenBMC.
The webserver implements a few distinct interfaces:
bmcweb at a protocol level supports http and https. TLS is supported through OpenSSL. Http1 and http2 are supported using ALPN registration for TLS connections and h2c upgrade header for http connections.
Bmcweb supports multiple authentication protocols:
Each of these types of authentication is able to be enabled or disabled both via runtime policy changes (through the relevant Redfish APIs) or via configure time options. All authentication mechanisms supporting username/password are routed to libpam, to allow for customization in authentication implementations.
All authorization in bmcweb is determined at routing time, and per route, and conform to the Redfish PrivilegeRegistry.
*Note: Non-Redfish functions are mapped to the closest equivalent Redfish privilege level.
bmcweb is configured per the meson build files. Available options are documented in meson_options.txt
meson setup builddir ninja -C builddir
If any of the dependencies are not found on the host system during configuration, meson will automatically download them via its wrap dependencies mentioned in bmcweb/subprojects.
bmcweb relies on some on-system data for storage of persistent data that is internal to the process. Details on the exact data stored and when it is read/written can seen from the persistent_data namespace.
When SSL support is enabled and a usable certificate is not found, bmcweb will generate a self-signed a certificate before launching the server. Please see the bmcweb source code for details on the parameters this certificate is built with.
bmcweb supports various forms of http compression, including zstd and gzip. Client headers are observed to determine whether compressed payloads are supported.
bmcweb is capable of aggregating resources from satellite BMCs. Refer to AGGREGATION.md for more information on how to enable and use this feature.