mirror of
https://github.com/jorisvink/kore
synced 2025-03-10 04:59:02 -04:00
cut off port from the domain when needed.
This commit is contained in:
parent
98af796acd
commit
5487950f63
@ -872,6 +872,7 @@ http_response_cookie(struct http_request *req, const char *name,
|
||||
const char *val, const char *path, time_t expires, u_int32_t maxage,
|
||||
struct http_cookie **out)
|
||||
{
|
||||
char *p;
|
||||
struct http_cookie *ck;
|
||||
|
||||
if (name == NULL || val == NULL)
|
||||
@ -886,6 +887,9 @@ http_response_cookie(struct http_request *req, const char *name,
|
||||
ck->domain = kore_strdup(req->host);
|
||||
ck->flags = HTTP_COOKIE_HTTPONLY | HTTP_COOKIE_SECURE;
|
||||
|
||||
if ((p = strrchr(ck->domain, ':')) != NULL)
|
||||
*p = '\0';
|
||||
|
||||
if (path != NULL)
|
||||
ck->path = kore_strdup(path);
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user