jfclere     2004/07/28 09:39:19

  Modified:    ajp/ajplib/test ajp_header.c
  Log:
  Add the routine that builds and sends the header using informations from
  the request_rec structure.
  
  Revision  Changes    Path
  1.4       +34 -0     jakarta-tomcat-connectors/ajp/ajplib/test/ajp_header.c
  
  Index: ajp_header.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/ajp_header.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ajp_header.c      28 Jul 2004 16:34:22 -0000      1.3
  +++ ajp_header.c      28 Jul 2004 16:39:19 -0000      1.4
  @@ -651,3 +651,37 @@
   
       return APR_SUCCESS;
   }
  +
  +/*
  + * Build the ajp header message and send it
  + */
  +apr_status_t ajp_send_header(apr_socket_t *sock,
  +                                  request_rec  *r)
  +{
  +    ajp_msg_t *msg;
  +    apr_status_t rc;
  +
  +    rc = ajp_msg_create(r->pool,msg);
  +    if (rc != APR_SUCCESS) {
  +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
  +               "ajp_send_header: ajp_msg_create failed");
  +        return rc;
  +    }
  +
  +    rc = ajp_marshal_into_msgb(msg,r);    
  +    if (rc != APR_SUCCESS) {
  +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
  +               "ajp_send_header: ajp_marshal_into_msgb failed");
  +        return rc;
  +    }
  +
  +    rc = ajp_ilink_send(sock,msg);
  +    if (rc != APR_SUCCESS) {
  +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
  +               "ajp_send_header: ajp_ilink_send failed");
  +        return rc;
  +    }
  +
  +    rc = ajp_ilink_send(sock,msg);
  +    return APR_SUCCESS;
  +}
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to