Home
last modified time | relevance | path

Searched hist:"601 c71ae" (Results 1 – 5 of 5) sorted by relevance

/openbmc/bmcweb/include/
H A Devent_service_store.hpp601c71ae Wed Sep 08 18:40:12 CDT 2021 Ed Tanous <edtanous@google.com> Improve HttpHeaders in EventService

This commit moves the internal data structures to use
boost::beast::http::fields as its internal data structure. fields is a
hyper-optimized map implementation for http headers, and has a lot of
nice escaping properties. It is what boost::beast::http::request uses
under the covers, so this has some niceties in reducing the amount of
code, and means we can completely remove the headers structure, and
simply rely on req. When this conversion was done, now the type safety
of the incoming data needs to have better checking, as loading into the
keys has new requirements (like values must be strings), so that type
conversion code for to and from json was added, and the POST and PATCH
handler updated to put into the new structure.

Tested:
curl -vvvv --insecure -u root:0penBmc
"https://192.168.7.2:443/redfish/v1/EventService/Subscriptions" -X POST
-d
"{\"Destination\":\"http://192.168.7.2:443/\",\"Context\":\"Public\",\"Protocol\":\"Redfish\",\"HttpHeaders\":[{\"Foo\":\"Bar\"}]}"
returned 200.

Tested various "bad" headers, and observed the correct type errors.

Issued: systemctl restart bmcweb.
Subscription restored properly verified with.
GET https://localhost:8001/redfish/v1/EventService/Subscriptions/183211400

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I331f65e1a3960f1812c9baac27dbdcb1d54f112c
H A Dpersistent_data.hpp601c71ae Wed Sep 08 18:40:12 CDT 2021 Ed Tanous <edtanous@google.com> Improve HttpHeaders in EventService

This commit moves the internal data structures to use
boost::beast::http::fields as its internal data structure. fields is a
hyper-optimized map implementation for http headers, and has a lot of
nice escaping properties. It is what boost::beast::http::request uses
under the covers, so this has some niceties in reducing the amount of
code, and means we can completely remove the headers structure, and
simply rely on req. When this conversion was done, now the type safety
of the incoming data needs to have better checking, as loading into the
keys has new requirements (like values must be strings), so that type
conversion code for to and from json was added, and the POST and PATCH
handler updated to put into the new structure.

Tested:
curl -vvvv --insecure -u root:0penBmc
"https://192.168.7.2:443/redfish/v1/EventService/Subscriptions" -X POST
-d
"{\"Destination\":\"http://192.168.7.2:443/\",\"Context\":\"Public\",\"Protocol\":\"Redfish\",\"HttpHeaders\":[{\"Foo\":\"Bar\"}]}"
returned 200.

Tested various "bad" headers, and observed the correct type errors.

Issued: systemctl restart bmcweb.
Subscription restored properly verified with.
GET https://localhost:8001/redfish/v1/EventService/Subscriptions/183211400

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I331f65e1a3960f1812c9baac27dbdcb1d54f112c
/openbmc/bmcweb/redfish-core/lib/
H A Devent_service.hpp601c71ae Wed Sep 08 18:40:12 CDT 2021 Ed Tanous <edtanous@google.com> Improve HttpHeaders in EventService

This commit moves the internal data structures to use
boost::beast::http::fields as its internal data structure. fields is a
hyper-optimized map implementation for http headers, and has a lot of
nice escaping properties. It is what boost::beast::http::request uses
under the covers, so this has some niceties in reducing the amount of
code, and means we can completely remove the headers structure, and
simply rely on req. When this conversion was done, now the type safety
of the incoming data needs to have better checking, as loading into the
keys has new requirements (like values must be strings), so that type
conversion code for to and from json was added, and the POST and PATCH
handler updated to put into the new structure.

Tested:
curl -vvvv --insecure -u root:0penBmc
"https://192.168.7.2:443/redfish/v1/EventService/Subscriptions" -X POST
-d
"{\"Destination\":\"http://192.168.7.2:443/\",\"Context\":\"Public\",\"Protocol\":\"Redfish\",\"HttpHeaders\":[{\"Foo\":\"Bar\"}]}"
returned 200.

Tested various "bad" headers, and observed the correct type errors.

Issued: systemctl restart bmcweb.
Subscription restored properly verified with.
GET https://localhost:8001/redfish/v1/EventService/Subscriptions/183211400

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I331f65e1a3960f1812c9baac27dbdcb1d54f112c
/openbmc/bmcweb/http/
H A Dhttp_client.hpp601c71ae Wed Sep 08 18:40:12 CDT 2021 Ed Tanous <edtanous@google.com> Improve HttpHeaders in EventService

This commit moves the internal data structures to use
boost::beast::http::fields as its internal data structure. fields is a
hyper-optimized map implementation for http headers, and has a lot of
nice escaping properties. It is what boost::beast::http::request uses
under the covers, so this has some niceties in reducing the amount of
code, and means we can completely remove the headers structure, and
simply rely on req. When this conversion was done, now the type safety
of the incoming data needs to have better checking, as loading into the
keys has new requirements (like values must be strings), so that type
conversion code for to and from json was added, and the POST and PATCH
handler updated to put into the new structure.

Tested:
curl -vvvv --insecure -u root:0penBmc
"https://192.168.7.2:443/redfish/v1/EventService/Subscriptions" -X POST
-d
"{\"Destination\":\"http://192.168.7.2:443/\",\"Context\":\"Public\",\"Protocol\":\"Redfish\",\"HttpHeaders\":[{\"Foo\":\"Bar\"}]}"
returned 200.

Tested various "bad" headers, and observed the correct type errors.

Issued: systemctl restart bmcweb.
Subscription restored properly verified with.
GET https://localhost:8001/redfish/v1/EventService/Subscriptions/183211400

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I331f65e1a3960f1812c9baac27dbdcb1d54f112c
/openbmc/bmcweb/redfish-core/include/
H A Devent_service_manager.hpp601c71ae Wed Sep 08 18:40:12 CDT 2021 Ed Tanous <edtanous@google.com> Improve HttpHeaders in EventService

This commit moves the internal data structures to use
boost::beast::http::fields as its internal data structure. fields is a
hyper-optimized map implementation for http headers, and has a lot of
nice escaping properties. It is what boost::beast::http::request uses
under the covers, so this has some niceties in reducing the amount of
code, and means we can completely remove the headers structure, and
simply rely on req. When this conversion was done, now the type safety
of the incoming data needs to have better checking, as loading into the
keys has new requirements (like values must be strings), so that type
conversion code for to and from json was added, and the POST and PATCH
handler updated to put into the new structure.

Tested:
curl -vvvv --insecure -u root:0penBmc
"https://192.168.7.2:443/redfish/v1/EventService/Subscriptions" -X POST
-d
"{\"Destination\":\"http://192.168.7.2:443/\",\"Context\":\"Public\",\"Protocol\":\"Redfish\",\"HttpHeaders\":[{\"Foo\":\"Bar\"}]}"
returned 200.

Tested various "bad" headers, and observed the correct type errors.

Issued: systemctl restart bmcweb.
Subscription restored properly verified with.
GET https://localhost:8001/redfish/v1/EventService/Subscriptions/183211400

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