Lines Matching defs:msg

214 static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
244 ajp_msg_reset(msg);
246 if (ajp_msg_append_uint8(msg, CMD_AJP13_FORWARD_REQUEST) ||
247 ajp_msg_append_uint8(msg, (apr_byte_t) method) ||
248 ajp_msg_append_string(msg, r->protocol) ||
249 ajp_msg_append_string(msg, uri->path) ||
250 ajp_msg_append_string(msg, r->useragent_ip) ||
251 ajp_msg_append_string(msg, remote_host) ||
252 ajp_msg_append_string(msg, ap_get_server_name(r)) ||
253 ajp_msg_append_uint16(msg, (apr_uint16_t)r->connection->local_addr->port) ||
254 ajp_msg_append_uint8(msg, is_ssl) ||
255 ajp_msg_append_uint16(msg, (apr_uint16_t) num_headers)) {
269 if (ajp_msg_append_uint16(msg, (apr_uint16_t)sc)) {
277 if (ajp_msg_append_string(msg, elts[i].key)) {
285 if (ajp_msg_append_string(msg, elts[i].val)) {
298 if (ajp_msg_append_uint8(msg, SC_A_SECRET) ||
299 ajp_msg_append_string(msg, s->secret)) {
309 if (ajp_msg_append_uint8(msg, SC_A_REMOTE_USER) ||
310 ajp_msg_append_string(msg, r->user)) {
318 if (ajp_msg_append_uint8(msg, SC_A_AUTH_TYPE) ||
319 ajp_msg_append_string(msg, r->ap_auth_type)) {
328 if (ajp_msg_append_uint8(msg, SC_A_QUERY_STRING) ||
329 ajp_msg_append_string(msg, uri->query)) {
337 if (ajp_msg_append_uint8(msg, SC_A_JVM_ROUTE) ||
338 ajp_msg_append_string(msg, session_route)) {
360 if (ajp_msg_append_uint8(msg, SC_A_SSL_CERT)
361 || ajp_msg_append_string(msg, envvar)) {
372 if (ajp_msg_append_uint8(msg, SC_A_SSL_CIPHER)
373 || ajp_msg_append_string(msg, envvar)) {
384 if (ajp_msg_append_uint8(msg, SC_A_SSL_SESSION)
385 || ajp_msg_append_string(msg, envvar)) {
398 if (ajp_msg_append_uint8(msg, SC_A_SSL_KEY_SIZE)
399 || ajp_msg_append_uint16(msg, (unsigned short) atoi(envvar))) {
409 if (ajp_msg_append_uint8(msg, SC_A_STORED_METHOD)
410 || ajp_msg_append_string(msg, r->method)) {
427 if (ajp_msg_append_uint8(msg, SC_A_REQ_ATTRIBUTE) ||
428 ajp_msg_append_string(msg, key) ||
429 ajp_msg_append_string(msg, envvar)) {
448 if (ajp_msg_append_uint8(msg, SC_A_REQ_ATTRIBUTE) ||
449 ajp_msg_append_string(msg, key) ||
450 ajp_msg_append_string(msg, val)) {
468 if (ajp_msg_append_uint8(msg, SC_A_REQ_ATTRIBUTE) ||
469 ajp_msg_append_string(msg, key) ||
470 ajp_msg_append_string(msg, val)) {
483 if (ajp_msg_append_uint8(msg, SC_A_REQ_ATTRIBUTE) ||
484 ajp_msg_append_string(msg, elts[i].key + 4) ||
485 ajp_msg_append_string(msg, elts[i].val)) {
495 if (ajp_msg_append_uint8(msg, SC_A_ARE_DONE)) {
538 static apr_status_t ajp_unmarshal_response(ajp_msg_t *msg,
548 rc = ajp_msg_get_uint16(msg, &status);
557 rc = ajp_msg_get_string(msg, &ptr);
571 rc = ajp_msg_get_uint16(msg, &num_headers);
597 rc = ajp_msg_peek_uint16(msg, &name);
603 ajp_msg_get_uint16(msg, &name);
614 rc = ajp_msg_get_string(msg, &stringname);
624 rc = ajp_msg_get_string(msg, &value);
673 ajp_msg_t *msg;
676 rc = ajp_msg_create(r->pool, buffsize, &msg);
683 rc = ajp_marshal_into_msgb(msg, r, uri);
690 rc = ajp_ilink_send(sock, msg);
691 ajp_msg_log(r, msg, "ajp_send_header: ajp_ilink_send packet dump");
707 ajp_msg_t **msg)
712 if (*msg) {
713 rc = ajp_msg_reuse(*msg);
721 rc = ajp_msg_create(r->pool, buffsize, msg);
728 ajp_msg_reset(*msg);
729 rc = ajp_ilink_receive(sock, *msg);
735 ajp_msg_log(r, *msg, "ajp_read_header: ajp_ilink_receive packet dump");
736 rc = ajp_msg_peek_uint8(*msg, &result);
748 /* parse the msg to read the type */
749 int ajp_parse_type(request_rec *r, ajp_msg_t *msg)
752 ajp_msg_peek_uint8(msg, &result);
761 ajp_msg_t *msg)
766 rc = ajp_msg_get_uint8(msg, &result);
779 return ajp_unmarshal_response(msg, r, conf);
783 apr_status_t ajp_parse_data(request_rec *r, ajp_msg_t *msg,
790 rc = ajp_msg_get_uint8(msg, &result);
803 rc = ajp_msg_get_uint16(msg, len);
808 * msg->len contains the complete length of the message including all
810 * msg->len minus the sum of
817 expected_len = msg->len - (AJP_HEADER_LEN + AJP_HEADER_SZ_LEN + 1 + 1);
824 *ptr = (char *)&(msg->buf[msg->pos]);
829 apr_status_t ajp_parse_reuse(request_rec *r, ajp_msg_t *msg,
835 rc = ajp_msg_get_uint8(msg, &result);
848 return ajp_msg_get_uint8(msg, reuse);
852 * Allocate a msg to send data
855 ajp_msg_t **msg)
859 if ((rc = ajp_msg_create(pool, *len, msg)) != APR_SUCCESS)
861 ajp_msg_reset(*msg);
862 *ptr = (char *)&((*msg)->buf[6]);
872 ajp_msg_t *msg, apr_size_t len)
875 msg->buf[4] = (apr_byte_t)((len >> 8) & 0xFF);
876 msg->buf[5] = (apr_byte_t)(len & 0xFF);
878 msg->len += len + 2; /* + 1 XXXX where is '\0' */
880 return ajp_ilink_send(sock, msg);