So this code basically says... if a header is longer than 1024 chars, trunc it
and don't print the trailing \r\n. So let's say you have a 1050 character
set-cookie string (not totally insane) ... now you serve blanks because the
next line (which happens to be the Location: header on a 302) is appended to
the previous line.
I think the solution is to make sure line is bigger than max cookie length
(4096) plus some room for the other params in the call. 4500?
Brian
void
evhttp_make_header(struct evhttp_connection *evcon, struct evhttp_request *req)
{
char line[1024];
struct evkeyval *header;
...
TAILQ_FOREACH(header, req->output_headers, next) {
evutil_snprintf(line, sizeof(line), "%s: %s\r\n",
header->key, header->value);
evbuffer_add(evcon->output_buffer, line, strlen(line));
}
_______________________________________________
Libevent-users mailing list
[email protected]
http://monkeymail.org/mailman/listinfo/libevent-users