MCPcopy Create free account
hub / github.com/apache/httpd / ap_proxy_ajp_request

Function ap_proxy_ajp_request

modules/proxy/mod_proxy_ajp.c:181–766  ·  view source on GitHub ↗

* process the request and write the response. */

Source from the content-addressed store, hash-verified

179 * process the request and write the response.
180 */
181static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
182 proxy_conn_rec *conn,
183 conn_rec *origin,
184 proxy_dir_conf *conf,
185 apr_uri_t *uri,
186 char *url, char *server_portstr)
187{
188 apr_status_t status;
189 int result;
190 apr_bucket *e;
191 apr_bucket_brigade *input_brigade;
192 apr_bucket_brigade *output_brigade;
193 ajp_msg_t *msg;
194 apr_size_t bufsiz = 0;
195 char *buff;
196 char *send_body_chunk_buff;
197 apr_uint16_t size;
198 apr_byte_t conn_reuse = 0;
199 const char *tenc;
200 int havebody = 1;
201 int client_failed = 0;
202 int backend_failed = 0;
203 apr_off_t bb_len;
204 int data_sent = 0;
205 int request_ended = 0;
206 int headers_sent = 0;
207 int rv = OK;
208 apr_int32_t conn_poll_fd;
209 apr_pollfd_t *conn_poll;
210 proxy_server_conf *psf =
211 ap_get_module_config(r->server->module_config, &proxy_module);
212 apr_size_t maxsize = AJP_MSG_BUFFER_SZ;
213 int send_body = 0;
214 apr_off_t content_length = 0;
215 int original_status = r->status;
216 const char *original_status_line = r->status_line;
217 const char *secret = NULL;
218
219 if (psf->io_buffer_size_set)
220 maxsize = psf->io_buffer_size;
221 /* Override with worker setting if present */
222 if (conn->worker->s->io_buffer_size_set)
223 maxsize = conn->worker->s->io_buffer_size;
224 if (maxsize > AJP_MAX_BUFFER_SZ)
225 maxsize = AJP_MAX_BUFFER_SZ;
226 else if (maxsize < AJP_MSG_BUFFER_SZ)
227 maxsize = AJP_MSG_BUFFER_SZ;
228 maxsize = APR_ALIGN(maxsize, 1024);
229
230 if (*conn->worker->s->secret)
231 secret = conn->worker->s->secret;
232
233 /*
234 * Send the AJP request to the remote server
235 */
236
237 /* send request headers */
238 status = ajp_send_header(conn->sock, r, maxsize, uri, secret);

Callers 1

proxy_ajp_handlerFunction · 0.85

Calls 15

ap_get_module_configFunction · 0.85
ajp_send_headerFunction · 0.85
is_idempotentFunction · 0.85
ajp_alloc_data_msgFunction · 0.85
ap_cstr_casecmpFunction · 0.85
get_content_lengthFunction · 0.85
ap_get_brigadeFunction · 0.85
ajp_send_data_msgFunction · 0.85
ajp_msg_logFunction · 0.85
ajp_read_headerFunction · 0.85
ajp_parse_typeFunction · 0.85

Tested by

no test coverage detected