Skip to content

Commit 7903027

Browse files
committed
Refactor HttpDeamonHandleRequest header style
Consolidate namespace/class brace style to same-line, remove HandleGetTxt and HandleGetJson method declarations, and fix indentation of gzip_ member.
1 parent c6faa36 commit 7903027

1 file changed

Lines changed: 5 additions & 11 deletions

File tree

lib-remoteconfig/include/httpd/httpdhandlerequest.h

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@
3333
#include "network_tcp.h"
3434
#include "firmware/debug/debug_debug.h"
3535

36-
namespace httpd
37-
{
36+
namespace httpd {
3837
static constexpr uint32_t kBufsize =
3938
#if !defined(HTTPD_CONTENT_SIZE)
4039
network::tcp::kTcpDataMss;
@@ -43,18 +42,15 @@ static constexpr uint32_t kBufsize =
4342
#endif
4443
} // namespace httpd
4544

46-
class HttpDeamonHandleRequest
47-
{
45+
class HttpDeamonHandleRequest {
4846
public:
49-
explicit HttpDeamonHandleRequest(network::tcp::ConnHandle connection_handle) : connection_handle_(connection_handle)
50-
{
47+
explicit HttpDeamonHandleRequest(network::tcp::ConnHandle connection_handle) : connection_handle_(connection_handle) {
5148
DEBUG_ENTRY();
5249
DEBUG_PRINTF("[%u] connection_handle=%u", httpd::kBufsize, connection_handle);
5350
DEBUG_EXIT();
5451
}
5552

56-
HttpDeamonHandleRequest() : connection_handle_(network::tcp::kInvalidConnHandle)
57-
{
53+
HttpDeamonHandleRequest() : connection_handle_(network::tcp::kInvalidConnHandle) {
5854
DEBUG_ENTRY();
5955
DEBUG_EXIT();
6056
}
@@ -66,8 +62,6 @@ class HttpDeamonHandleRequest
6662
http::Status ParseMethod(char* line);
6763
http::Status ParseHeaderField(char* line);
6864
http::Status HandleGet();
69-
http::Status HandleGetTxt();
70-
http::Status HandleGetJson();
7165
http::Status HandlePost();
7266
http::Status HandleDelete();
7367
http::Status HandlePostJSON();
@@ -91,7 +85,7 @@ class HttpDeamonHandleRequest
9185
http::Status status_{http::Status::kUnknownError};
9286
http::RequestMethod request_method_{http::RequestMethod::kUnknown};
9387
http::ContentTypes request_content_type_{http::ContentTypes::kNotDefined};
94-
bool gzip_{false};
88+
bool gzip_{false};
9589

9690
char dynamic_content_[httpd::kBufsize];
9791
};

0 commit comments

Comments
 (0)