Re: How to make FASTCGI deliver an external file
Jose Adriano Baltieri <jabaltie-a/[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Organization | UNIMEP |
| Message-ID | <[email protected]> |
Ravi Menon wrote:
> In Linux and FreeBSD world, there is a very efficient sendfile() and
> the 'outfd' is usually
> a tcp socket fd.
I use something very similar from the http server API. It has a function
like that. Of course I wonder that it users internal http server
mechanism to do it.
What I'm suggesting here is the same thing (method) for FastCGI !
> I haven't tried this if the fd is a unix socket as is
> the case with fast-cgi.
> The neat thing is that you don't have to re-read the file etc.. it is
> a zero-copy optimized, largely designed for such file serving tasks.
Yes !
> The FreeBSD version is better has it has provisions to include a
> custom header (e.g. http response headers) and trailer along with the
> file in a single syscall.
>
> Since your example seem to imply a Windows environment, you may want
> to explore if such a similar syscall is available there.
Yes, I need Windows only.
However, it's not a matter of a operating system API call, I guess.
I think it would be a function from FastCGI API. In it's turn, FastCGI
would call there inside the http server a specific function from this
http server API.
Isnt it like that ?
--
Obrigado,
------------------------------------------------------------------------------
Jose Adriano Baltieri - Analista de Sistemas
DTI - CENTRO - UNIMEP - Universidade Metodista de Piracicaba
PIRACICABA - SP - Brasil - Fone : (19) 3124-1858
------------------------------------------------------------------------------
___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/