task manager, license formatting
This commit is contained in:
parent
fe2fbb9ad0
commit
f1a2006b4b
69 changed files with 380 additions and 122 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue