Commit | Line | Data |
0198fd3c |
1 | NAME |
2 | FCGI_StartFilterData - fcgi_stdio compatibility library |
3 | |
4 | SYNOPSIS |
5 | #include "fcgi_stdio.h" |
6 | |
7 | int |
8 | FCGI_StartFilterData(void); |
9 | |
10 | |
11 | DESCRIPTION |
12 | Enables a FastCGI Filter application to begin reading its filter |
13 | input data from stdin. |
14 | |
15 | In order to call FCGI_StartFilterData, the FastCGI |
16 | application should have been invoked in the Filter role |
17 | (getenv("FCGI_ROLE") == "FILTER"), and should have read |
18 | stdin to EOF, consuming the entire FCGI_STDIN data stream. |
19 | The call to FCGI_StartFilterData positions stdin at the |
20 | start of FCGI_DATA. |
21 | |
22 | If the preconditions are not met (e.g. the application has |
23 | not read stdin to EOF), FCGI_StartFilterData returns |
24 | a negative result, and the application will get EOF on attempts |
25 | to read from stdin. |
26 | |
27 | The application can determine the number of bytes available |
28 | on FCGI_DATA by performing atoi(getenv("FCGI_DATA_LENGTH")). |
29 | If fewer than this many bytes are delievered on stdin after |
30 | calling FCGI_StartFilterData, the application should perform |
31 | an application-specific error response. If the application |
32 | normally makes an update, most likely it should abort the update. |
33 | |
34 | The application can determine last modification time of the |
35 | filter input data by performing getenv("FCGI_DATA_LAST_MOD"). |
36 | This allows applications to perform caching based on last |
37 | modification time. |
38 | |
39 | |
40 | RETURN VALUES |
41 | 0 for successful call, < 0 for error. |
42 | |
43 | SEE ALSO |
44 | FCGI_Accept(3) |
45 | FCGI_SetExitStatus(3) |
46 | cgi-fcgi(1) |
47 | |
48 | HISTORY |
49 | Copyright (c) 1996 Open Market, Inc. |
af1b4cad |
50 | See the file "LICENSE" for information on usage and redistribution |
0198fd3c |
51 | of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
52 | $Id: FCGI_StartFilterData.3,v 1.1 1997/09/16 15:36:26 stanleyg Exp $ |