mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Fixed access to Static::yacreaderSessionStore
members.
This commit is contained in:
parent
31018a4c38
commit
10c261c77a
@ -19,7 +19,7 @@ ComicController::ComicController() {}
|
|||||||
void ComicController::service(HttpRequest& request, HttpResponse& response)
|
void ComicController::service(HttpRequest& request, HttpResponse& response)
|
||||||
{
|
{
|
||||||
HttpSession session=Static::sessionStore->getSession(request,response,false);
|
HttpSession session=Static::sessionStore->getSession(request,response,false);
|
||||||
YACReaderHttpSession *ySession = Static::yacreaderSessionStore.value(session.getId());
|
YACReaderHttpSession *ySession = Static::yacreaderSessionStore->getYACReaderSessionHttpSession(session.getId());
|
||||||
|
|
||||||
QString path = QUrl::fromPercentEncoding(request.getPath()).toUtf8();
|
QString path = QUrl::fromPercentEncoding(request.getPath()).toUtf8();
|
||||||
QStringList pathElements = path.split('/');
|
QStringList pathElements = path.split('/');
|
||||||
|
@ -11,7 +11,7 @@ CoverController::CoverController() {}
|
|||||||
void CoverController::service(HttpRequest& request, HttpResponse& response)
|
void CoverController::service(HttpRequest& request, HttpResponse& response)
|
||||||
{
|
{
|
||||||
HttpSession session=Static::sessionStore->getSession(request,response,false);
|
HttpSession session=Static::sessionStore->getSession(request,response,false);
|
||||||
YACReaderHttpSession *ySession = Static::yacreaderSessionStore.value(session.getId());
|
YACReaderHttpSession *ySession = Static::yacreaderSessionStore->getYACReaderSessionHttpSession(session.getId());
|
||||||
|
|
||||||
response.setHeader("Content-Type", "image/jpeg");
|
response.setHeader("Content-Type", "image/jpeg");
|
||||||
response.setHeader("Connection","close");
|
response.setHeader("Connection","close");
|
||||||
|
@ -28,7 +28,7 @@ FolderController::FolderController() {}
|
|||||||
void FolderController::service(HttpRequest& request, HttpResponse& response)
|
void FolderController::service(HttpRequest& request, HttpResponse& response)
|
||||||
{
|
{
|
||||||
HttpSession session=Static::sessionStore->getSession(request,response,false);
|
HttpSession session=Static::sessionStore->getSession(request,response,false);
|
||||||
YACReaderHttpSession *ySession = Static::yacreaderSessionStore.value(session.getId());
|
YACReaderHttpSession *ySession = Static::yacreaderSessionStore->getYACReaderSessionHttpSession(session.getId());
|
||||||
|
|
||||||
response.setHeader("Content-Type", "text/html; charset=utf-8");
|
response.setHeader("Content-Type", "text/html; charset=utf-8");
|
||||||
response.setHeader("Connection","close");
|
response.setHeader("Connection","close");
|
||||||
|
@ -13,7 +13,7 @@ LibrariesController::LibrariesController() {}
|
|||||||
void LibrariesController::service(HttpRequest& request, HttpResponse& response)
|
void LibrariesController::service(HttpRequest& request, HttpResponse& response)
|
||||||
{
|
{
|
||||||
HttpSession session=Static::sessionStore->getSession(request,response,false);
|
HttpSession session=Static::sessionStore->getSession(request,response,false);
|
||||||
YACReaderHttpSession *ySession = Static::yacreaderSessionStore.value(session.getId());
|
YACReaderHttpSession *ySession = Static::yacreaderSessionStore->getYACReaderSessionHttpSession(session.getId());
|
||||||
|
|
||||||
response.setHeader("Content-Type", "text/html; charset=utf-8");
|
response.setHeader("Content-Type", "text/html; charset=utf-8");
|
||||||
response.setHeader("Connection","close");
|
response.setHeader("Connection","close");
|
||||||
|
@ -18,7 +18,7 @@ PageController::PageController() {}
|
|||||||
void PageController::service(HttpRequest& request, HttpResponse& response)
|
void PageController::service(HttpRequest& request, HttpResponse& response)
|
||||||
{
|
{
|
||||||
HttpSession session=Static::sessionStore->getSession(request,response,false);
|
HttpSession session=Static::sessionStore->getSession(request,response,false);
|
||||||
YACReaderHttpSession *ySession = Static::yacreaderSessionStore.value(session.getId());
|
YACReaderHttpSession *ySession = Static::yacreaderSessionStore->getYACReaderSessionHttpSession(session.getId());
|
||||||
|
|
||||||
QString path = QUrl::fromPercentEncoding(request.getPath()).toUtf8();
|
QString path = QUrl::fromPercentEncoding(request.getPath()).toUtf8();
|
||||||
bool remote = path.endsWith("remote");
|
bool remote = path.endsWith("remote");
|
||||||
|
@ -41,7 +41,7 @@ void RequestMapper::loadSession(HttpRequest & request, HttpResponse& response)
|
|||||||
HttpSession session=Static::sessionStore->getSession(request,response);
|
HttpSession session=Static::sessionStore->getSession(request,response);
|
||||||
if(session.contains("ySession")) //session is already alive check if it is needed to update comics
|
if(session.contains("ySession")) //session is already alive check if it is needed to update comics
|
||||||
{
|
{
|
||||||
YACReaderHttpSession *ySession = Static::yacreaderSessionStore.value(session.getId());
|
YACReaderHttpSession *ySession = Static::yacreaderSessionStore->getYACReaderSessionHttpSession(session.getId());
|
||||||
|
|
||||||
QString postData = QString::fromUtf8(request.getBody());
|
QString postData = QString::fromUtf8(request.getBody());
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ void RequestMapper::loadSession(HttpRequest & request, HttpResponse& response)
|
|||||||
{
|
{
|
||||||
YACReaderHttpSession *ySession = new YACReaderHttpSession(this);
|
YACReaderHttpSession *ySession = new YACReaderHttpSession(this);
|
||||||
|
|
||||||
Static::yacreaderSessionStore.insert(session.getId(), ySession);
|
Static::yacreaderSessionStore->addYACReaderHttpSession(session.getId(), ySession);
|
||||||
|
|
||||||
session.set("ySession","ok");
|
session.set("ySession","ok");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user