You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by jf...@apache.org on 2002/05/10 17:30:17 UTC
cvs commit: jakarta-tomcat-connectors/webapp/lib pr_warp.c wa_request.c
jfclere 02/05/10 08:30:17
Modified: webapp/apache-1.3 mod_webapp.c
webapp/apache-2.0 mod_webapp.c
webapp/include wa_request.h
webapp/lib pr_warp.c wa_request.c
Log:
Add modification of status line.
Revision Changes Path
1.34 +10 -1 jakarta-tomcat-connectors/webapp/apache-1.3/mod_webapp.c
Index: mod_webapp.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/apache-1.3/mod_webapp.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- mod_webapp.c 3 May 2002 13:30:25 -0000 1.33
+++ mod_webapp.c 10 May 2002 15:30:17 -0000 1.34
@@ -57,7 +57,7 @@
/**
* @author Pier Fumagalli <ma...@betaversion.org>
- * @version $Id: mod_webapp.c,v 1.33 2002/05/03 13:30:25 pier Exp $
+ * @version $Id: mod_webapp.c,v 1.34 2002/05/10 15:30:17 jfclere Exp $
*/
#include <httpd.h>
@@ -297,6 +297,14 @@
req->status=status;
}
+/* Set the HTTP status of the response. */
+void wam_handler_setstatusline(wa_request *r, char * status) {
+ request_rec *req=(request_rec *)r->data;
+
+ if (status !=NULL && status[0]!='\0')
+ req->status_line=apr_pstrdup(req->pool,status);
+}
+
/* Set the MIME Content-Type of the response. */
void wam_handler_setctype(wa_request *r, char *type) {
@@ -374,6 +382,7 @@
static wa_handler wam_handler = {
wam_handler_log,
wam_handler_setstatus,
+ wam_handler_setstatusline,
wam_handler_setctype,
wam_handler_setheader,
wam_handler_commit,
1.10 +11 -1 jakarta-tomcat-connectors/webapp/apache-2.0/mod_webapp.c
Index: mod_webapp.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/apache-2.0/mod_webapp.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- mod_webapp.c 3 May 2002 13:30:25 -0000 1.9
+++ mod_webapp.c 10 May 2002 15:30:17 -0000 1.10
@@ -57,7 +57,7 @@
/**
* @author Pier Fumagalli <ma...@betaversion.org>
- * @version $Id: mod_webapp.c,v 1.9 2002/05/03 13:30:25 pier Exp $
+ * @version $Id: mod_webapp.c,v 1.10 2002/05/10 15:30:17 jfclere Exp $
*/
#include <httpd.h>
@@ -300,6 +300,15 @@
req->status=status;
}
+/* Set the HTTP status of the response. */
+void wam_handler_setstatusline(wa_request *r, char * status) {
+ request_rec *req=(request_rec *)r->data;
+
+ if (status !=NULL && status[0]!='\0')
+ req->status_line=apr_pstrdup(req->pool,status);
+}
+
+
/* Set the MIME Content-Type of the response. */
static void wam_handler_setctype(wa_request *r, char *type) {
request_rec *req=(request_rec *)r->data;
@@ -381,6 +390,7 @@
static wa_handler wam_handler = {
wam_handler_log,
wam_handler_setstatus,
+ wam_handler_setstatusline,
wam_handler_setctype,
wam_handler_setheader,
wam_handler_commit,
1.11 +3 -1 jakarta-tomcat-connectors/webapp/include/wa_request.h
Index: wa_request.h
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/include/wa_request.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- wa_request.h 1 Nov 2001 22:20:51 -0000 1.10
+++ wa_request.h 10 May 2002 15:30:17 -0000 1.11
@@ -58,7 +58,7 @@
/**
* @package Request Handling
* @author Pier Fumagalli <ma...@betaversion.org>
- * @version $Id: wa_request.h,v 1.10 2001/11/01 22:20:51 pier Exp $
+ * @version $Id: wa_request.h,v 1.11 2002/05/10 15:30:17 jfclere Exp $
*/
#ifndef _WA_REQUEST_H_
#define _WA_REQUEST_H_
@@ -95,6 +95,7 @@
struct wa_handler {
void (*log)(wa_request *r, const char *file, const int line, char *msg);
void (*setstatus)(wa_request *r, int status);
+ void (*setstatusline)(wa_request *r, char *status);
void (*setctype)(wa_request *r, char *type);
void (*setheader)(wa_request *r, char *name, char *value);
void (*commit)(wa_request *r);
@@ -188,6 +189,7 @@
void wa_rlog(wa_request *r, const char *f, const int l, const char *fmt, ...);
void wa_rsetstatus(wa_request *r, int status);
+void wa_rsetstatusline(wa_request *r, char *status);
void wa_rsetctype(wa_request *r, char *type);
void wa_rsetheader(wa_request *r, char *name, char *value);
void wa_rcommit(wa_request *r);
1.22 +2 -1 jakarta-tomcat-connectors/webapp/lib/pr_warp.c
Index: pr_warp.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/lib/pr_warp.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- pr_warp.c 26 Apr 2002 13:12:35 -0000 1.21
+++ pr_warp.c 10 May 2002 15:30:17 -0000 1.22
@@ -54,7 +54,7 @@
* *
* ========================================================================= */
-/* @version $Id: pr_warp.c,v 1.21 2002/04/26 13:12:35 jfclere Exp $ */
+/* @version $Id: pr_warp.c,v 1.22 2002/05/10 15:30:17 jfclere Exp $ */
#include "pr_warp.h"
/* Initialize this provider. */
@@ -404,6 +404,7 @@
p_read_string(pack,&mesg);
wa_debug(WA_MARK,"=== %d %s",status,mesg);
wa_rsetstatus(r,status);
+ wa_rsetstatusline(r,mesg);
break;
}
case TYPE_RES_HEADER: {
1.18 +4 -1 jakarta-tomcat-connectors/webapp/lib/wa_request.c
Index: wa_request.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/lib/wa_request.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- wa_request.c 9 Jan 2002 11:26:08 -0000 1.17
+++ wa_request.c 10 May 2002 15:30:17 -0000 1.18
@@ -55,7 +55,7 @@
* *
* ========================================================================= */
-/* @version $Id: wa_request.c,v 1.17 2002/01/09 11:26:08 jfclere Exp $ */
+/* @version $Id: wa_request.c,v 1.18 2002/05/10 15:30:17 jfclere Exp $ */
#include <wa.h>
/* Allocate a new request structure. */
@@ -220,6 +220,9 @@
void wa_rsetstatus(wa_request *r, int status) {
r->hand->setstatus(r,status);
+}
+void wa_rsetstatusline(wa_request *r, char *status) {
+ r->hand->setstatusline(r,status);
}
void wa_rsetctype(wa_request *r, char *type) {
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>