[Mono-devel-list] About mod_mono_unix
yoros at wanadoo.es
yoros at wanadoo.es
Sat Sep 27 07:41:02 EDT 2003
Hi,
Since mod_mono_unix has support for Apache 1.3.x I noticed that it
doesn't work if the length of the requested data is over 16378 bytes
because TCP/IP protocol will split it in many separated frames/packets.
I send a patch to mod_mono_unix for join the splitted data.
If it's right to be commited, please tell me.
I have another stuff. In the research I made to know where was the bug I
changed the socket type from UNIX to IP. I can add this feature to
mod-mono-server and mod_mono_unix and select one socket type through
compiling time flags. I think that supporting this two socket types
could be good for the module and could make it work in windows.
I can make this and send a patch to the list, Is it right?
See you,
Pedro
--
Pedro Martínez Juliá
\ yoros at terra.es
)| yoros at wanadoo.es
/ http://yoros.dyndns.org
Socio HispaLinux #311
Usuario Linux #275438 - http://counter.li.org
GnuPG public information: pub 1024D/74F1D3AC
Key fingerprint = 8431 7B47 D2B4 5A46 5F8E 534F 588B E285 74F1 D3AC
-------------- next part --------------
Index: src/mod_mono_unix.c
===================================================================
RCS file: /cvs/public/mod_mono/src/mod_mono_unix.c,v
retrieving revision 1.7
diff -u -p -r1.7 mod_mono_unix.c
--- src/mod_mono_unix.c 19 Sep 2003 19:23:19 -0000 1.7
+++ src/mod_mono_unix.c 27 Sep 2003 11:46:13 -0000
@@ -319,11 +319,17 @@ static char *
read_data_string (apr_pool_t *pool, int fd, char **ptr, int *size)
{
int l;
+ int count;
char *buf;
read (fd, &l, sizeof (int));
buf = apr_pcalloc (pool, l + 1);
- read (fd, buf, l);
+ count = l;
+ do {
+ /* if the data length is more than 16379, TCP/IP breaks it in
+ * many packets, we need to join them */
+ count -= read (fd, buf + l - count, l);
+ } while (count > 0);
/* buf [l] = '\0'; */
if (ptr)
*ptr = buf;
More information about the Mono-devel-list
mailing list