forked from treefrogframework/treefrog-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modified to add a max-age value and a same-site value to cookie.
- Loading branch information
1 parent
7522bc4
commit 6b6e51b
Showing
11 changed files
with
70 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
#include "tcookiejar.h" | ||
#include "tcookie.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
#include "../src/tcookiejar.h" | ||
#include "../src/tcookie.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,34 @@ | ||
#include "tcookiejar.h" | ||
#ifndef TCOOKIE_H | ||
#define TCOOKIE_H | ||
|
||
#include <TGlobal> | ||
#include <QNetworkCookie> | ||
|
||
|
||
class TCookie : public QNetworkCookie | ||
{ | ||
public: | ||
TCookie(const QByteArray &name = QByteArray(), const QByteArray &value = QByteArray()); | ||
TCookie(const TCookie &other); | ||
TCookie(const QNetworkCookie &other); | ||
~TCookie() {} | ||
|
||
TCookie &operator=(const TCookie &other); | ||
qint64 maxAge() const { return _maxAge; } | ||
void setMaxAge(qint64 maxAge) { _maxAge = maxAge; } | ||
QByteArray sameSite() const { return _sameSite; } | ||
bool setSameSite(const QByteArray &sameSite); | ||
|
||
void swap(TCookie &other); | ||
QByteArray toRawForm(QNetworkCookie::RawForm form = QNetworkCookie::Full) const; | ||
bool operator!=(const TCookie &other) const; | ||
bool operator==(const TCookie &other) const; | ||
|
||
static QList<TCookie> parseCookies(const QByteArray &cookieString); | ||
|
||
private: | ||
qint64 _maxAge {INT64_MIN}; | ||
QByteArray _sameSite; | ||
}; | ||
|
||
#endif // TCOOKIE_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters