Pada hari Selasa, tanggal 10/01/2006 pukul 11:53 +0100, Alvaro Lopez
Ortega menulis:
> Hi Mohammad,
>
> > It would be wonderful to be able to localize the last packet rather
> > than parsing all the buffer.. I will take a look at it.
>
> I have committed this change, and it seems to be working..
>
> http://www.0x50.org/bugs/changeset/128
>
> so, we don't need to parse the full buffer any longer :-)
>
I found sometimes the write_buffer is changed somewhere so the
last_header is no longer valid. So even the pad is appended but the pad
length is not filled in paddingLength. With this patch now it will work
for "ab -c 1 -n 100".
Using -c more than 1 or -n more than 100 is still failing, with another
cause of problem which is being investigated now.
Index: handler_fastcgi.c
===================================================================
--- handler_fastcgi.c (revision 128)
+++ handler_fastcgi.c (working copy)
@@ -227,17 +227,15 @@
FCGI_Header **req_ref)
{
FCGI_BeginRequestRecord request;
- int len;
+ int len, old_len;
len = key_len + val_len;
len += key_len > 127 ? 4 : 1;
len += val_len > 127 ? 4 : 1;
fcgi_build_header (&request.header, FCGI_PARAMS, id, len, 0);
+ old_len = buf->len;
- if (req_ref != NULL)
- *req_ref = buf->buf + buf->len;
-
cherokee_buffer_ensure_size (buf, buf->len + key_len + val_len + sizeof(FCGI_Header));
cherokee_buffer_add (buf, (void *)&request.header, sizeof(FCGI_Header));
@@ -261,6 +259,9 @@
cherokee_buffer_add (buf, key, key_len);
cherokee_buffer_add (buf, val, val_len);
+
+ if (req_ref != NULL)
+ *req_ref = buf->buf + old_len;
}
_______________________________________________
Cherokee mailing list
[email protected]
http://www.alobbs.com/cgi-bin/mailman/listinfo/cherokee