Ns_ConnReturnFile
Return a file as a complete response
- Provided by: aolserver4-dev (Version: 4.5.1-18)
- Source: aolserver4
- Report a bug
Return a file as a complete response
#include "ns.h" int Ns_ConnReturnFile(conn, status, type, file)
This routine is used to generate complete responses, including the HTTP status code specified by the status argument and appropriate headers followed by the contents of the file specified with the file argument. This routine utilizes the underlying builtin file-server code (aka, "fastpath"). As such, it shares the fastpath capabilities to automatically cache pre-read or memory mapped copies of the files and can safely support multiple, simultaneous responses. The following headers are included in the output:
connnection, response