External cookies
FossilOrigin-Name: 7172dd686cfa12d6d02979a1eaef6fc2818a59d4e9ef9bf9b27427df2396717c
This commit is contained in:
parent
c633d81f10
commit
762ad3dc00
2 changed files with 11 additions and 0 deletions
|
@ -28,6 +28,8 @@ enum cookie_state
|
|||
STATE_V_START,
|
||||
};
|
||||
|
||||
struct cookie_values cookies = { 0 };
|
||||
|
||||
char* parse_cookies(char* begin, struct http_cookie_info* info)
|
||||
{
|
||||
int keydone = 0;
|
||||
|
|
|
@ -20,6 +20,13 @@
|
|||
#define COOKIE_H
|
||||
#include <stddef.h>
|
||||
|
||||
struct cookie_values
|
||||
{
|
||||
char* access_token;
|
||||
char* logged_in;
|
||||
char* theme;
|
||||
};
|
||||
|
||||
struct http_cookie_info
|
||||
{
|
||||
char* key;
|
||||
|
@ -27,6 +34,8 @@ struct http_cookie_info
|
|||
size_t val_len; // Val may be large, like CSS property
|
||||
};
|
||||
|
||||
extern struct cookie_values cookies;
|
||||
|
||||
// Stupidly fast simple cookie parser
|
||||
char* parse_cookies(char* begin, struct http_cookie_info* info);
|
||||
int cookie_get_val(char* src, char* key, struct http_cookie_info* info);
|
||||
|
|
Loading…
Reference in a new issue