mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 13:04:28 -04:00
Move from session based state to client side tokens.
YACReaderHttpSession is still used, but it is not a http session anymore.
This commit is contained in:
@ -68,9 +68,14 @@ void StaticFileController::service(HttpRequest& request, HttpResponse& response)
|
||||
QString fileName = paths.last();
|
||||
stringPath.remove(fileName);
|
||||
HttpSession session=Static::sessionStore->getSession(request,response,false);
|
||||
YACReaderHttpSession *ySession = Static::yacreaderSessionStore->getYACReaderSessionHttpSession(session.getId());
|
||||
QString device = ySession->getDeviceType();
|
||||
QString display = ySession->getDisplayType();
|
||||
YACReaderHttpSession *ySession = Static::yacreaderSessionStore->getYACReaderSessionHttpSession(session.getId());
|
||||
QString device = "ipad";
|
||||
QString display = "@2x";
|
||||
if (ySession != nullptr) {
|
||||
device = ySession->getDeviceType();
|
||||
display = ySession->getDisplayType();
|
||||
}
|
||||
|
||||
if(fileName.endsWith(".png"))
|
||||
fileName = getDeviceAwareFileName(fileName, device, display, request.getHeader("Accept-Language"), stringPath);
|
||||
else
|
||||
|
Reference in New Issue
Block a user