* Build the ajp header message and send it */
| 686 | * Build the ajp header message and send it |
| 687 | */ |
| 688 | apr_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. |
no test coverage detected