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

Function ajp_send_header

modules/proxy/ajp_header.c:688–720  ·  view source on GitHub ↗

* Build the ajp header message and send it */

Source from the content-addressed store, hash-verified

686 * Build the ajp header message and send it
687 */
688apr_status_t ajp_send_header(apr_socket_t *sock,
689 request_rec *r,
690 apr_size_t buffsize,
691 apr_uri_t *uri,
692 const char *secret)
693{
694 ajp_msg_t *msg;
695 apr_status_t rc;
696
697 rc = ajp_msg_create(r->pool, buffsize, &msg);
698 if (rc != APR_SUCCESS) {
699 ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00987)
700 "ajp_send_header: ajp_msg_create failed");
701 return rc;
702 }
703
704 rc = ajp_marshal_into_msgb(msg, r, uri, secret);
705 if (rc != APR_SUCCESS) {
706 ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00988)
707 "ajp_send_header: ajp_marshal_into_msgb failed");
708 return rc;
709 }
710
711 rc = ajp_ilink_send(sock, msg);
712 ajp_msg_log(r, msg, "ajp_send_header: ajp_ilink_send packet dump");
713 if (rc != APR_SUCCESS) {
714 ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00989)
715 "ajp_send_header: ajp_ilink_send failed");
716 return rc;
717 }
718
719 return APR_SUCCESS;
720}
721
722/*
723 * Read the ajp message and return the type of the message.

Callers 1

ap_proxy_ajp_requestFunction · 0.85

Calls 4

ajp_msg_createFunction · 0.85
ajp_marshal_into_msgbFunction · 0.85
ajp_ilink_sendFunction · 0.85
ajp_msg_logFunction · 0.85

Tested by

no test coverage detected