You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by firingme <fi...@gmail.com> on 2005/08/23 05:45:11 UTC

some problem about mod_ftpd

Hi, I've downloaded the mod_ftpd's src from
http://www.outoforder.cc/projects/apache/mod_ftpd/ and have
installed it on my WinXP box. When I read the code, I found some
problem and got some thought. I don't know if this is the right
place to put the idea, but I've mailed the author yesterday, and
didn't receive any reply. so, I post my idea here and hope
somebody'll give some direction to me.

First, the mod_ftpd's doc says that it can't be runned under
Win32. Through debug, I've found it's because some funciton
in it used more than 1M stack space, Just make stack var to
heap/pool var will solve this problem:

static char *ftpd_ascii_convert(...)
{
 /* char temp[p, FTPD_IO_BUFFER_MAX*2] ;  */
 char* temp = apr_palloc(p, FTPD_IO_BUFFER_MAX*2) ;
}

HANDLER_DECLARE(stor)
{
    /* char buff[FTPD_IO_BUFFER_MAX] ;  */
 char* buff = apr_palloc(r->pool, FTPD_IO_BUFFER_MAX) ;
}

HANDLER_DECLARE(retr)
{
   /* char buff[FTPD_IO_BUFFER_MAX] ;  */
   char* buff = apr_palloc(r->pool, FTPD_IO_BUFFER_MAX) ;
}

Next, there isn't any cache mechanism in the stor&retr's handler,
I think maybe mod_disk_cache can help here.

Third, the funcion ftpd_ascii_convert can use the technology appeared
in Nick's article: http://www.apachetutor.org/dev/brigades to reduce
the memory usage.

And the last, I don't know if I can directly write:
ap_rgetline(&buffer, FTPD_STRING_LENGTH, &len, r, 0, bb) != APR_SUCCESS)
in my main-loop code. I've seen from mod_echo.c that is use
ap_get_brigade(c->input_filters, bb, AP_MODE_GETLINE,APR_BLOCK_READ, 0) != 
APR_SUCCESS)
instead of ap_rgetline.




Re: some problem about mod_ftpd

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
At 03:14 AM 8/23/2005, Colm MacCarthaigh wrote:
>On Tue, Aug 23, 2005 at 11:45:11AM +0800, firingme wrote:
>> Next, there isn't any cache mechanism in the stor&retr's handler,
>> I think maybe mod_disk_cache can help here.
>
>In addition to mod_ftpd, there is also mod_ftp, which is in the process
>of becoming an incubated httpd subproject;
>
>        http://incubator.apache.org/projects/mod_ftp.html
>
>This does not currently support caching either, however that is
>definitely an aim of at least one of its volunteers.

Don't be too certain of that; since mod_ftp uses subrequests to
serve the requested content, any filtering or caching applied
may percolate to the mod_ftp protocol layer.  That said, if the
only content serving hook supported by mod_cache is the quick
handler, it likely does not, today.

Bill



Re: some problem about mod_ftpd

Posted by firingme <fi...@gmail.com>.
"Colm MacCarthaigh" <co...@stdlib.net> 
??????:20050823081411.GA7182@stdlib.net...
> On Tue, Aug 23, 2005 at 11:45:11AM +0800, firingme wrote:
>> Next, there isn't any cache mechanism in the stor&retr's handler,
>> I think maybe mod_disk_cache can help here.
>
> In addition to mod_ftpd, there is also mod_ftp, which is in the process
> of becoming an incubated httpd subproject;
>
> http://incubator.apache.org/projects/mod_ftp.html
>

Sorry, but how can I get the src code of mod_ftp ? I can't find svn's server 
addr in the page 




Re: some problem about mod_ftpd

Posted by Colm MacCarthaigh <co...@stdlib.net>.
On Tue, Aug 23, 2005 at 11:45:11AM +0800, firingme wrote:
> Next, there isn't any cache mechanism in the stor&retr's handler,
> I think maybe mod_disk_cache can help here.

In addition to mod_ftpd, there is also mod_ftp, which is in the process
of becoming an incubated httpd subproject;

	http://incubator.apache.org/projects/mod_ftp.html

This does not currently support caching either, however that is
definitely an aim of at least one of its volunteers. It's likely that
any approach to making mod_cache work with non-HTTP requests will be
generic enough that this can be applied to mod_ftp also.

-- 
Colm MacCárthaigh                        Public Key: colm+pgp@stdlib.net