Format the new auth code.
This commit is contained in:
@ -1040,7 +1040,7 @@ const char* tf_http_get_cookie(const char* cookie_header, const char* name)
|
||||
|
||||
int name_start = 0;
|
||||
int equals = 0;
|
||||
for (int i = 0; ; i++)
|
||||
for (int i = 0;; i++)
|
||||
{
|
||||
if (cookie_header[i] == '=')
|
||||
{
|
||||
@ -1048,9 +1048,7 @@ const char* tf_http_get_cookie(const char* cookie_header, const char* name)
|
||||
}
|
||||
else if (cookie_header[i] == ',' || cookie_header[i] == ';' || cookie_header[i] == '\0')
|
||||
{
|
||||
if (equals > name_start &&
|
||||
strncmp(cookie_header + name_start, name, equals - name_start) == 0 &&
|
||||
(int)strlen(name) == equals - name_start)
|
||||
if (equals > name_start && strncmp(cookie_header + name_start, name, equals - name_start) == 0 && (int)strlen(name) == equals - name_start)
|
||||
{
|
||||
int length = i - equals - 1;
|
||||
char* result = tf_malloc(length + 1);
|
||||
|
Reference in New Issue
Block a user