Niklas wrote: |
Stefan,
perhaps there should be something like the bold text below in elogd.c:
int process_http_request(const char *request, int i_conn)^M
...
/* extract cookies */^M
if ((p = strstr(request, "Cookie:")) != NULL) {^M
p += 6;^M
do {^M
p++;^M
while (*p && *p == ' ')^M
p++;^M
strlcpy(str, p, sizeof(str));^M
for (i = 0; i < (int) strlen(str); i++)^M
if (str[i] == '=' || str[i] == ';')^M
break;^M
if (str[i] == '=') {^M
str[i] = 0;^M
p += i + 1;^M
for (i = 0; *p && *p != ';' && *p != '\r' && *p != '\n' && i < (int) sizeof(cookie); i++)
cookie[i] = *p++;
...
|
Wow, where did you get that long cookie from? Certainly not from elogd. You must run elogd under Apache, and have some other service next to it on your server which distributes this long cookies, that's why other people did not experience this problem yet. I appreciate your fix. It's alwasy nice to see users not only complain about things, but try to fix them. Your fix is almost correct, you need a
i<(int) sizeof(cookie)-1
since there is the trailing zero for terminating the cookie string. I applied your fix to SVN revision #2146. |