ICAP request related API.
More...
|
typedef struct ci_request | ci_request_t |
| This is the struct which holds all the data which represent an ICAP request. More...
|
|
ICAP request related API.
#define ci_req_allow204 |
( |
|
req | ) |
((req)->allow204) |
- Parameters
-
req | is pointer to an object of type ci_request_t |
- Returns
- True (non zero int) if the ICAP request supports "Allow 204"
#define ci_req_allow206 |
( |
|
req | ) |
((req)->allow206) |
- Parameters
-
req | is pointer to an object of type ci_request_t |
- Returns
- True (non zero int) if the ICAP request supports "Allow 206"
#define ci_req_allow206_outside_preview |
( |
|
req | ) |
((req)->allow206 && (req)->allow204) |
- Parameters
-
req | is pointer to an object of type ci_request_t |
- Returns
- True (non zero int) if the ICAP request supports "Allow 206" outside preview requests
#define ci_req_hasalldata |
( |
|
req | ) |
((req)->eof_received) |
- Parameters
-
req | is pointer to an object of type ci_request_t |
- Returns
- True (non zero int) if the ICAP client has sent all the data (headers and body data) to the ICAP server
- Examples:
- services/echo/srv_echo.c.
#define ci_req_hasbody |
( |
|
req | ) |
((req)->hasbody) |
- Parameters
-
req | is pointer to an object of type ci_request_t |
- Returns
- true (non zero int) if the ICAP request contains body data else zero
- Examples:
- services/echo/srv_echo.c.
#define ci_req_lock_data |
( |
|
req | ) |
((req)->data_locked = 1) |
Lock a ci_request_t object.
After called the c-icap server stops sending body data to the ICAP client.
- Parameters
-
req | is pointer to an object of type ci_request_t |
#define ci_req_preview_size |
( |
|
req | ) |
((req)->preview) /*The preview data size*/ |
- Parameters
-
req | is pointer to an object of type ci_request_t |
- Returns
- The ICAP preview size
#define ci_req_sent_data |
( |
|
req | ) |
((req)->status) |
- Parameters
-
req | is pointer to an object of type ci_request_t |
- Returns
- True (non zero int) if the c-icap server has send data to the client
#define ci_req_type |
( |
|
req | ) |
((req)->type) |
- Returns
- ICAP_OPTIONS, ICAP_REQMOD or ICAP_RESPMOD if the ICAP request is options, request modification or response modification ICAP request
#define ci_req_unlock_data |
( |
|
req | ) |
((req)->data_locked = 0) |
Unlock a ci_request_t object.
When called the c-icap server will start sending body data to the ICAP client.
- Parameters
-
req | is pointer to an object of type ci_request_t |
- Examples:
- services/echo/srv_echo.c.
This is the struct which holds all the data which represent an ICAP request.
The developers should not access directly the fields of this struct but better use the documented macros and functions
const char* ci_icap_add_xheader |
( |
ci_request_t * |
req, |
|
|
const char * |
header |
|
) |
| |
Add an icap X-header to the icap response headers.
It can be used with both request and response modification ICAP requests.
- Parameters
-
req | is a pointer to the current ICAP request object. |
header | is the header to add in the form "Header: Value" |
- Returns
- pointer to the header in success or NULL otherwise
Append the icap X-headers to the icap response headers.
It can be used with both request and response modification ICAP requests.
- Parameters
-
req | is a pointer to the current ICAP request object. |
headers | is a pointer to the headers object to add |
- Returns
- pointer to the header in success or NULL otherwise