Searched defs:req (Results 1 - 25 of 36) sorted by relevance

12

/dovecot/src/lib-http/
H A Dhttp-request.c9 bool http_request_has_connection_option(const struct http_request *req, argument
14 if (!array_is_created(&req->connection_options))
16 array_foreach(&req->connection_options, opt_idx) {
23 int http_request_get_payload_size(const struct http_request *req, argument
26 if (req->payload == NULL) {
31 return i_stream_get_size(req->payload, TRUE, size_r);
H A Dhttp-request.h53 http_request_method_is(const struct http_request *req, const char *method) argument
55 if (req->method == NULL)
58 return (strcmp(req->method, method) == 0);
62 http_request_header_find(const struct http_request *req, const char *name) argument
64 return http_header_field_find(req->header, name);
68 http_request_header_get(const struct http_request *req, const char *name) argument
70 return http_header_field_get(req->header, name);
74 http_request_header_get_fields(const struct http_request *req) argument
76 return http_header_get_fields(req->header);
79 bool http_request_has_connection_option(const struct http_request *req,
[all...]
H A Dhttp-client-host.c408 struct http_client_request *req)
410 struct http_client *client = req->client;
415 req->host = host;
417 http_client_request_get_peer_addr(req, &addr);
421 http_client_request_error(&req,
429 http_client_queue_submit_request(queue, req);
407 http_client_host_submit_request(struct http_client_host *host, struct http_client_request *req) argument
H A Dhttp-client.c243 struct http_client_request *req; local
250 req = client->requests_list;
251 while (req != NULL) {
252 struct http_client_request *next_req = req->next;
253 http_client_request_destroy(&req);
254 req = next_req;
389 struct http_client_request *req = *req_idx; local
391 i_assert(req->refcount == 1);
392 http_client_request_error_delayed(&req);
398 struct http_client_request *req)
397 http_client_delay_request_error(struct http_client *client, struct http_client_request *req) argument
408 http_client_remove_request_error(struct http_client *client, struct http_client_request *req) argument
[all...]
H A Dtest-http-client.c27 static void payload_input(struct http_test_request *req) argument
34 while ((ret=i_stream_read_more(req->payload, &data, &size)) > 0) {
36 if (req->write_output)
39 i_stream_skip(req->payload, size);
46 if (req->payload->stream_errno != 0) {
48 i_stream_get_error(req->payload));
51 io_remove(&req->io);
52 i_stream_unref(&req->payload);
53 i_free(req);
59 struct http_test_request *req)
58 got_request_response(const struct http_response *response, struct http_test_request *req) argument
[all...]
H A Dtest-http-server.c64 struct http_server_request *req)
67 const struct http_request *http_req = http_server_request_get(req);
74 http_resp = http_server_response_create(req, 501, "Not Implemented");
106 http_resp = http_server_response_create(req, 200, "OK");
63 client_http_handle_request(void *context, struct http_server_request *req) argument
H A Dhttp-client-queue.c176 struct http_client_request *req = *req_idx; local
178 i_assert(req->state >= HTTP_REQUEST_STATE_QUEUED);
180 req->state != HTTP_REQUEST_STATE_QUEUED)
183 http_client_request_error(&req, status, error);
616 struct http_client_request *req)
622 "Dropping request %s", http_client_request_label(req));
625 if (req->urgent) {
628 if (reqs[i] == req) {
636 if (reqs[i] == req) {
644 if (req
615 http_client_queue_drop_request(struct http_client_queue *queue, struct http_client_request *req) argument
728 struct http_client_request *req = reqs[i]; local
798 http_client_queue_submit_now(struct http_client_queue *queue, struct http_client_request *req) argument
893 http_client_queue_submit_request(struct http_client_queue *queue, struct http_client_request *req) argument
970 struct http_client_request *req; local
[all...]
H A Dhttp-server-connection.c199 static void http_server_payload_destroyed(struct http_server_request *req) argument
201 struct http_server_connection *conn = req->conn;
205 i_assert(conn->request_queue_tail == req ||
206 req->state >= HTTP_SERVER_REQUEST_STATE_FINISHED);
222 if (req->response == NULL && stream_errno != 0 &&
229 http_server_request_fail_close(req, 413, "Payload Too Large");
235 http_server_request_fail_close(req, 400, "Bad Request");
243 switch (req->state) {
247 req->state = HTTP_SERVER_REQUEST_STATE_PROCESSING;
249 if (req
280 http_server_connection_request_callback( struct http_server_connection *conn, struct http_server_request *req) argument
307 http_server_connection_handle_request(struct http_server_connection *conn, struct http_server_request *req) argument
496 struct http_server_request *req; local
543 struct http_server_request *req; local
848 struct http_server_request *req; local
962 struct http_server_request *req = conn->request_queue_head; local
1118 struct http_server_request *req, *req_next; local
[all...]
H A Dhttp-server-response.c64 http_server_response_create(struct http_server_request *req, argument
69 if (req->response == NULL) {
70 resp = req->response = p_new
71 (req->pool, struct http_server_response, 1);
76 resp = req->response;
82 resp->request = req;
84 resp->reason = p_strdup(req->pool, reason);
320 struct http_server_request *req = resp->request; local
321 struct http_server *server = req->server;
322 struct http_server_connection *conn = req
469 struct http_server_request *req = resp->request; local
560 struct http_server_request *req = resp->request; local
[all...]
/dovecot/src/auth/
H A Dtest-lua.c19 struct auth_request *req = auth_request_new_dummy(); local
20 req->passdb = passdb_mock();
21 req->debug = TRUE;
22 req->user = "testuser";
25 "function auth_passdb_lookup(req)\n"
26 " req:log_debug(\"user \" .. req.user)\n"
27 " return dovecot.auth.PASSDB_RESULT_OK, req:var_expand(\"password=pass\")\n"
37 test_assert(auth_lua_call_passdb_lookup(script, req, &scheme, &pass, &error) == 1);
40 i_free(req
[all...]
H A Ddb-oauth2.h17 struct oauth2_request *req; member in struct:db_oauth2_request
38 void db_oauth2_lookup(struct db_oauth2 *db, struct db_oauth2_request *req, const char *token, struct auth_request *request, db_oauth2_lookup_callback_t *callback, void *context);
39 #define db_oauth2_lookup(db, req, token, request, callback, context) \
40 db_oauth2_lookup(db, req, token + \
H A Dpassdb-oauth2.c13 oauth2_verify_plain_continue(struct db_oauth2_request *req, argument
23 req->verify_callback(result, request);
33 struct db_oauth2_request *req = local
35 req->pool = request->pool;
36 req->verify_callback = callback;
40 db_oauth2_lookup(module->db, req, password, request, oauth2_verify_plain_continue, request);
H A Ddb-lua.c41 auth_request_lua_do_var_expand(struct auth_request *req, const char *tpl, argument
45 if (t_auth_request_var_expand(tpl, req, NULL, value_r, &error) < 0) {
56 struct auth_request *req = auth_lua_check_auth_request(script, 1); local
60 if (auth_request_lua_do_var_expand(req, tpl, &value, &error) < 0) {
69 auth_request_template_build(struct auth_request *req, const char *str, argument
72 if (req->userdb_lookup) {
90 struct auth_request *req = auth_lua_check_auth_request(script, 1); local
95 const char *const *fields = auth_request_template_build(req, tplstr, &count);
111 } else if (auth_request_lua_do_var_expand(req, value, &expanded, &error) < 0) {
218 struct auth_request *req local
252 auth_lua_push_auth_request(struct dlua_script *script, struct auth_request *req) argument
361 auth_lua_call_lookup(struct dlua_script *script, const char *fn, struct auth_request *req, const char **error_r) argument
408 auth_lua_export_fields(struct auth_request *req, const char *str, const char **scheme_r, const char **password_r) argument
436 auth_lua_export_table(struct dlua_script *script, struct auth_request *req, const char **scheme_r, const char **password_r) argument
475 auth_lua_export_userdb_table(struct dlua_script *script, struct auth_request *req, const char **error_r) argument
492 auth_lua_export_passdb_table(struct dlua_script *script, struct auth_request *req, const char **scheme_r, const char **password_r, const char **error_r) argument
510 auth_lua_call_lookup_finish(struct dlua_script *script, struct auth_request *req, const char **scheme_r, const char **password_r, const char **error_r) argument
537 auth_lua_call_password_verify(struct dlua_script *script, struct auth_request *req, const char *password, const char **error_r) argument
588 auth_lua_call_passdb_lookup(struct dlua_script *script, struct auth_request *req, const char **scheme_r, const char **password_r, const char **error_r) argument
603 auth_lua_call_userdb_lookup(struct dlua_script *script, struct auth_request *req, const char **error_r) argument
630 auth_lua_call_userdb_iterate_init(struct dlua_script *script, struct auth_request *req, userdb_iter_callback_t *callback, void *context) argument
[all...]
/dovecot/src/lib-oauth2/
H A Doauth2.c13 oauth2_parse_json(struct oauth2_request *req) argument
20 req->field_name = NULL;
22 while((ret = json_parse_next(req->parser, &type, &token)) > 0) {
23 if (req->field_name == NULL) {
27 req->field_name = p_strdup(req->pool, token);
30 p_free(req->pool, req->field_name);
31 json_parse_skip_next(req->parser);
33 if (!array_is_created(&req
71 struct oauth2_request *req = *_req; local
80 oauth2_request_free_internal(struct oauth2_request *req) argument
93 oauth2_request_set_headers(struct oauth2_request *req, const struct oauth2_request_input *input) argument
[all...]
H A Doauth2-introspect.c14 oauth2_introspection_callback(struct oauth2_request *req, argument
18 i_assert(req->is_callback != NULL);
19 oauth2_introspection_callback_t *callback = req->is_callback;
20 req->is_callback = NULL;
21 callback(res, req->is_context);
22 oauth2_request_free_internal(req);
26 oauth2_introspect_continue(struct oauth2_request *req, bool success, argument
34 res.fields = &req->fields;
36 oauth2_introspection_callback(req, &res);
41 struct oauth2_request *req)
40 oauth2_introspect_response(const struct http_response *response, struct oauth2_request *req) argument
60 oauth2_introspection_delayed_error(struct oauth2_request *req) argument
79 struct oauth2_request *req = local
[all...]
H A Doauth2-private.h9 struct http_client_request *req; member in struct:oauth2_request
38 void oauth2_request_set_headers(struct oauth2_request *req,
41 void oauth2_request_free_internal(struct oauth2_request *req);
43 void oauth2_parse_json(struct oauth2_request *req);
H A Doauth2-refresh.c14 oauth2_refresh_callback(struct oauth2_request *req, argument
18 i_assert(req->re_callback != NULL);
19 oauth2_refresh_callback_t *callback = req->re_callback;
20 req->re_callback = NULL;
21 callback(res, req->re_context);
22 oauth2_request_free_internal(req);
56 oauth2_refresh_continue(struct oauth2_request *req, bool success, argument
68 array_foreach(&req->fields, field) {
74 res.fields = &req->fields;
76 oauth2_refresh_callback(req,
80 oauth2_refresh_response(const struct http_response *response, struct oauth2_request *req) argument
100 oauth2_refresh_delayed_error(struct oauth2_request *req) argument
119 struct oauth2_request *req = local
[all...]
H A Doauth2-token-validate.c15 oauth2_token_validation_callback(struct oauth2_request *req, argument
19 i_assert(req->tv_callback != NULL);
20 oauth2_token_validation_callback_t *callback = req->tv_callback;
21 req->tv_callback = NULL;
22 callback(res, req->tv_context);
23 oauth2_request_free_internal(req);
27 oauth2_token_validate_continue(struct oauth2_request *req, bool success, argument
33 i_assert(array_is_created(&req->fields) || !success);
37 res.valid = req->valid;
42 array_foreach(&req
62 oauth2_token_validate_response(const struct http_response *response, struct oauth2_request *req) argument
89 oauth2_token_validation_delayed_error(struct oauth2_request *req) argument
111 struct oauth2_request *req = local
[all...]
/dovecot/src/lib-ldap/
H A Dldap-compare.c8 struct ldap_op_queue_entry *req,
36 const struct ldap_compare_input *input = &req->input.compare;
45 req->result_callback(&res, req->result_callback_ctx);
53 ldap_compare_send(struct ldap_connection *conn, struct ldap_op_queue_entry *req, argument
56 const struct ldap_compare_input *input = &req->input.compare;
78 &(req->msgid));
93 struct ldap_op_queue_entry *req; local
95 req = p_new(pool, struct ldap_op_queue_entry, 1);
96 req
7 ldap_compare_callback(struct ldap_connection *conn, struct ldap_op_queue_entry *req, LDAPMessage *message, bool *finished_r) argument
[all...]
H A Dldap-search.c16 ldap_search_result_failure(struct ldap_op_queue_entry *req, argument
19 struct ldap_search_ctx *sctx = req->ctx;
22 req->result_callback(&sctx->res, req->result_callback_ctx);
25 static void ldap_search_result_success(struct ldap_op_queue_entry *req) argument
27 struct ldap_search_ctx *sctx = req->ctx;
29 req->result_callback(&sctx->res, req->result_callback_ctx);
34 struct ldap_op_queue_entry *req,
37 struct ldap_search_ctx *sctx = req
33 ldap_search_callback(struct ldap_connection *conn, struct ldap_op_queue_entry *req, LDAPMessage *message, bool *finished_r) argument
87 ldap_search_send(struct ldap_connection *conn, struct ldap_op_queue_entry *req, const char **error_r) argument
131 struct ldap_op_queue_entry *req; local
[all...]
H A Dldap-connection.c12 int ldap_connect_next_message(struct ldap_connection *conn, struct ldap_op_queue_entry *req, bool *finished_r);
14 void ldap_connection_abort_request(struct ldap_op_queue_entry *req);
16 void ldap_connection_request_destroy(struct ldap_op_queue_entry **req);
210 struct ldap_op_queue_entry *req,
218 if (req->result_callback != NULL)
219 req->result_callback(&res, req->result_callback_ctx);
227 struct ldap_op_queue_entry *req)
233 if (req->result_callback != NULL)
234 req
209 ldap_connection_result_failure(struct ldap_connection *conn, struct ldap_op_queue_entry *req, int ret, const char *error) argument
226 ldap_connection_result_success(struct ldap_connection *conn, struct ldap_op_queue_entry *req) argument
241 struct ldap_op_queue_entry *req; local
297 struct ldap_op_queue_entry *req = *_req; local
305 ldap_connection_queue_request(struct ldap_connection *conn, struct ldap_op_queue_entry *req) argument
317 ldap_connection_connect_parse(struct ldap_connection *conn, struct ldap_op_queue_entry *req, LDAPMessage *message, bool *finished_r) argument
408 ldap_connection_abort_request(struct ldap_op_queue_entry *req) argument
459 ldap_connect_next_message(struct ldap_connection *conn, struct ldap_op_queue_entry *req, bool *finished_r) argument
524 struct ldap_op_queue_entry *req = p_new(pool, struct ldap_op_queue_entry, 1); local
602 struct ldap_op_queue_entry *req; local
[all...]
/dovecot/src/lib-master/
H A Dmaster-auth.c157 struct master_auth_request req; local
172 req = params->request;
173 req.tag = ++auth->tag_counter;
174 if (req.tag == 0)
175 req.tag = ++auth->tag_counter;
179 req.ino = st.st_ino;
181 buf = t_buffer_create(sizeof(req) + req.data_size);
182 buffer_append(buf, &req, sizeof(req));
[all...]
H A Dmaster-login.c405 struct master_auth_request req; local
412 ret = master_login_conn_read_request(conn, &req, data, &client_fd);
424 for (i = 0; i < req.data_size; i++) {
432 req.data_size -= i;
433 client = i_malloc(MALLOC_ADD(sizeof(struct master_login_client), req.data_size));
436 client->auth_req = req;
438 memcpy(client->data, data+i, req.data_size);
441 master_login_auth_request(login->auth, &req,
H A Dmaster-login-auth.c400 struct master_login_auth_request *req)
402 if (auth->auth_server_pid != req->auth_pid && auth->spid_received) {
405 (unsigned int)req->auth_pid,
414 struct master_login_auth_request *req, *next; local
416 for (req = auth->request_head; req != NULL; req = next) {
417 next = req->next;
418 if (!auth_request_check_spid(auth, req))
419 req
399 auth_request_check_spid(struct master_login_auth *auth, struct master_login_auth_request *req) argument
424 master_login_auth_send_request(struct master_login_auth *auth, struct master_login_auth_request *req) argument
448 master_login_auth_request(struct master_login_auth *auth, const struct master_auth_request *req, master_login_auth_request_callback_t *callback, void *context) argument
[all...]
/dovecot/src/login-common/
H A Dsasl-server.c124 struct master_auth_request req; local
135 i_zero(&req);
136 req.auth_pid = anvil_request->auth_pid;
137 req.auth_id = anvil_request->auth_id;
138 req.local_ip = client->local_ip;
139 req.remote_ip = client->ip;
140 req.local_port = client->local_port;
141 req.remote_port = client->remote_port;
142 req.client_pid = getpid();
145 req
181 struct anvil_request *req = context; local
215 struct anvil_request *req; local
[all...]

Completed in 119 milliseconds

12