summaryrefslogtreecommitdiff
path: root/http/utility.hpp
AgeCommit message (Collapse)AuthorFilesLines
2021-02-24Fix the build on clang-11Ed Tanous1-0/+2
Clang tidy 11 got some really neat checks that do a much better job. Unfortunately, this, combined with the change in how std::executors has defined how callbacks should work differently in the past, which we picked up in 1.73, and now in theory we have recursion in a bunch of our IO loops that we have to break manually. In practice, this is unlikely to matter, as there's almost a 0% chance that we go through N thousand requests without ever starving the IO buffer. Other changes to make this build include: 1. Adding inline on the appropriate places where declared in a header. 2. Removing an Openssl call that did nothing, as the result was immediately overwritten. 3. Declaring the subproject dependencies as system dependencies, which silences the clang-tidy checks for those projects. Tested: Code builds again, clang-tidy passes Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ic11b1002408e8ac19a17a955e9477cac6e0d7504
2021-02-06Add chrono include to http/utility.hppEd Tanous1-0/+1
In commit d139c2364bec98a5da1fe803414f3b02fdcd3092, http utility picked up a dependency on chrono (for getting timestamps) but was relying on another files include to function. This adds the appropriate include. Tested: Code builds. No functional changes. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I7c2353f2b5f991d78a76dbe19a0b55850c0126b9
2021-02-03http: utility: Add base64encodeAdriana Kobylak1-0/+58
Add the base64encode() function to be used to encode binary data to offload out of the BMC. Based on crow/utility.h, reworked for readability. Tested: Added unit test cases. Also verified data encoded with this function was the same as the original binary when using a decoder. Change-Id: I0a27ffb0090c4613e296af33d11e2e2657957167 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
2020-10-23fix include namesEd Tanous1-0/+573
cppcheck isn't smart enough to recognize these are c++ headers, not c headers. Considering we're already inconsistent about our naming, it's easier to just be consistent, and move the last few files to use .hpp instead of .h. Tested: Code builds, no changes. Signed-off-by: Ed Tanous <ed@tanous.net> Change-Id: Ic348d695f8527fa4a0ded53f433e1558c319db40