Skip to content

Commit

Permalink
Fix #17 (and some spacing)
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkoPera committed Sep 20, 2023
1 parent 11567ca commit 4f28fa3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/WebbinoCore/WebServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const char *responseCodeToMessage (HttpStatusCode code) {
return msg;
}

#define replyIsSuccessful(x) ((x) / 100) == 2)
#define replyIsSuccessful(x) (((x) / 100) == 2)

boolean WebServer::begin (NetworkInterface& _netint) {
nStorage = 0;
Expand Down Expand Up @@ -291,12 +291,12 @@ void WebServer::handleClient (WebClient& client) {
client.print (responseCodeToMessage (responseCode));
client.print (F(HEADER_END));

if (replyIsSuccessful (responseCode) {
if (replyIsSuccessful (responseCode)) {
client.print (F(CONT_TYPE_HEADER));
client.print (PSTR_TO_F (contType.getType ()));
client.print (F(HEADER_END));

if(ALLOW_CROSS_ORIGIN){
if (ALLOW_CROSS_ORIGIN) {
client.print (F(ACCESS_CONTROL_ALLOW_ORIGIN));
client.print (F(HEADER_END));
}
Expand Down

0 comments on commit 4f28fa3

Please sign in to comment.