task manager, license formatting

This commit is contained in:
Blue 2023-12-30 19:42:11 -03:00
parent fe2fbb9ad0
commit f1a2006b4b
Signed by: blue
GPG key ID: 9B203B252A63EE38
69 changed files with 380 additions and 122 deletions

View file

@ -1,3 +1,6 @@
#SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
#SPDX-License-Identifier: GPL-3.0-or-later
set(HEADERS
request.h
redirect.h

View file

@ -1,5 +1,5 @@
// SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
// SPDX-License-Identifier: GPL-3.0-or-later
//SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
//SPDX-License-Identifier: GPL-3.0-or-later
#pragma once

View file

@ -1,5 +1,5 @@
// SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
// SPDX-License-Identifier: GPL-3.0-or-later
//SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
//SPDX-License-Identifier: GPL-3.0-or-later
#include "redirect.h"
@ -9,4 +9,4 @@ Redirect::Redirect(Accepting* destination):
const char* Redirect::what() const noexcept {
return "This is a redirect, should have beeh handled in router, but if you see it - something went terrebly wrong";
}
}

View file

@ -1,5 +1,5 @@
// SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
// SPDX-License-Identifier: GPL-3.0-or-later
//SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
//SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
@ -13,4 +13,4 @@ public:
Accepting* destination;
const char* what() const noexcept override;
};
};

View file

@ -1,5 +1,5 @@
// SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
// SPDX-License-Identifier: GPL-3.0-or-later
//SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
//SPDX-License-Identifier: GPL-3.0-or-later
#include "request.h"
@ -140,8 +140,8 @@ void Request::responseIsComplete() {
throw std::runtime_error("An attempt to mark the request as complete, but it wasn't responded");
break;
case State::responding:
std::cout << responseCode() << '\t' << methodName() << '\t' << path << std::endl;
state = State::responded;
std::cout << responseCode() << '\t' << methodName() << '\t' << path << std::endl;
break;
case State::responded:
throw std::runtime_error("An attempt to mark the request as a complete for the second time");
@ -265,4 +265,4 @@ std::string Request::getAuthorizationToken() const {
trim(result);
return result;
}
}

View file

@ -1,5 +1,5 @@
// SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
// SPDX-License-Identifier: GPL-3.0-or-later
//SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
//SPDX-License-Identifier: GPL-3.0-or-later
#pragma once