Permalink
Browse files

DataSize was 5 over the actual size.

	The data size sent to mod-mono-server was 5 over the actual length of
	the data, since it accounted for the command (1 byte) and the size
	itself (4 bytes).
  • Loading branch information...
1 parent 0446e3a commit a73c8adc7d18df18237016521f107cd46a4609d8 @gonzalop gonzalop committed Sep 29, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/mod_mono.c
View
@@ -2006,7 +2006,7 @@ send_initial_data (request_rec *r, apr_socket_t *sock, char auto_app)
else
ptr = str = apr_pcalloc (r->pool, size);
*ptr++ = (char)PROTOCOL_VERSION; /* version. Keep in sync with ModMonoRequest. */
- i = LE_FROM_INT (size);
+ i = LE_FROM_INT (size) - (1 + sizeof (size)); /* Subtract the command the data size from the buffer size */
memcpy (ptr, &i, sizeof (i));
ptr += sizeof (int32_t);
ptr += write_string_to_buffer (ptr, 0, r->method, info.method_len);

0 comments on commit a73c8ad

Please sign in to comment.