You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2002/03/21 00:44:00 UTC
cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_requtil.h jk_service.h
costin 02/03/20 15:44:00
Modified: jk/native2/include jk_requtil.h jk_service.h
Log:
Made some of the requtil functions part of the jk_service interface.
Server adapters can override those methods - for example a more
efficient implementation of getMethod() is possible, serializing
the data directly on the jk_msg, without copy, etc.
In addition this allows server adapters to integrate with other
server modules - for example the cookie ( required for lb ) may
be already parsed, or the session id may be integrated with
other resources ( this will be required as soon as we implment
form auth ).
Revision Changes Path
1.5 +0 -27 jakarta-tomcat-connectors/jk/native2/include/jk_requtil.h
Index: jk_requtil.h
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_requtil.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- jk_requtil.h 21 Feb 2002 11:15:51 -0000 1.4
+++ jk_requtil.h 20 Mar 2002 23:44:00 -0000 1.5
@@ -75,33 +75,6 @@
#endif /* __cplusplus */
/*
- * Request methods, coded as numbers instead of strings.
- * The list of methods was taken from Section 5.1.1 of RFC 2616,
- * RFC 2518, the ACL IETF draft, and the DeltaV IESG Proposed Standard.
- */
-#define SC_M_OPTIONS (unsigned char)1
-#define SC_M_GET (unsigned char)2
-#define SC_M_HEAD (unsigned char)3
-#define SC_M_POST (unsigned char)4
-#define SC_M_PUT (unsigned char)5
-#define SC_M_DELETE (unsigned char)6
-#define SC_M_TRACE (unsigned char)7
-#define SC_M_PROPFIND (unsigned char)8
-#define SC_M_PROPPATCH (unsigned char)9
-#define SC_M_MKCOL (unsigned char)10
-#define SC_M_COPY (unsigned char)11
-#define SC_M_MOVE (unsigned char)12
-#define SC_M_LOCK (unsigned char)13
-#define SC_M_UNLOCK (unsigned char)14
-#define SC_M_ACL (unsigned char)15
-#define SC_M_REPORT (unsigned char)16
-#define SC_M_VERSION_CONTROL (unsigned char)17
-#define SC_M_CHECKIN (unsigned char)18
-#define SC_M_CHECKOUT (unsigned char)19
-#define SC_M_UNCHECKOUT (unsigned char)20
-#define SC_M_SEARCH (unsigned char)21
-
-/*
* Frequent request headers, these headers are coded as numbers
* instead of strings.
*/
1.10 +72 -2 jakarta-tomcat-connectors/jk/native2/include/jk_service.h
Index: jk_service.h
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_service.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- jk_service.h 22 Feb 2002 11:06:01 -0000 1.9
+++ jk_service.h 20 Mar 2002 23:44:00 -0000 1.10
@@ -63,7 +63,7 @@
* Author: Gal Shachor <sh...@il.ibm.com> *
* Author: Dan Milstein <da...@shore.net> *
* Author: Henri Gomez <hg...@slib.fr> *
- * Version: $Revision: 1.9 $ *
+ * Version: $Revision: 1.10 $ *
***************************************************************************/
#ifndef JK_SERVICE_H
@@ -93,6 +93,35 @@
typedef struct jk_ws_service jk_ws_service_t;
/*
+ * Request methods, coded as numbers instead of strings.
+ * The list of methods was taken from Section 5.1.1 of RFC 2616,
+ * RFC 2518, the ACL IETF draft, and the DeltaV IESG Proposed Standard.
+ */
+#define SC_M_OPTIONS (unsigned char)1
+#define SC_M_GET (unsigned char)2
+#define SC_M_HEAD (unsigned char)3
+#define SC_M_POST (unsigned char)4
+#define SC_M_PUT (unsigned char)5
+#define SC_M_DELETE (unsigned char)6
+#define SC_M_TRACE (unsigned char)7
+#define SC_M_PROPFIND (unsigned char)8
+#define SC_M_PROPPATCH (unsigned char)9
+#define SC_M_MKCOL (unsigned char)10
+#define SC_M_COPY (unsigned char)11
+#define SC_M_MOVE (unsigned char)12
+#define SC_M_LOCK (unsigned char)13
+#define SC_M_UNLOCK (unsigned char)14
+#define SC_M_ACL (unsigned char)15
+#define SC_M_REPORT (unsigned char)16
+#define SC_M_VERSION_CONTROL (unsigned char)17
+#define SC_M_CHECKIN (unsigned char)18
+#define SC_M_CHECKOUT (unsigned char)19
+#define SC_M_UNCHECKOUT (unsigned char)20
+#define SC_M_SEARCH (unsigned char)21
+
+
+
+/*
* The web server service 'class'. An instance of this class is created
* for each request which is forwarded from the web server to the servlet
* container. Contains the basic information about the request
@@ -228,7 +257,17 @@
struct jk_map *headers_out;
/* Count remaining bytes ( original content length minus what was sent */
- int left_bytes_to_send;
+ int left_bytes_to_send;
+
+ /* Experimental - support for helper workers and buffering
+ */
+ int outPos;
+ int outSize;
+ char *outBuf;
+
+ /** printf style output. Formats in the tmp buf, then calls write
+ */
+ void (*jkprintf)( struct jk_env *env, struct jk_ws_service *s, char *frm,... );
/*
* Callbacks into the web server. For each, the first argument is
@@ -271,6 +310,37 @@
* Flush the output buffers.
*/
int (JK_METHOD *flush)(struct jk_env *env, jk_ws_service_t *s );
+
+ /** Get the method id. SC_M_* fields are the known types.
+ */
+ /* int (JK_METHOD *getMethodId)(struct jk_env *env, jk_ws_service_t *s); */
+
+ /** Get a cookie value by name.
+ */
+ /* char *(JK_METHOD *getCookie)(struct jk_env *env, jk_ws_service_t *s, */
+ /* const char *name ); */
+
+ /** Get a path param ( ;foo=bar )
+ */
+ /* char *(JK_METHOD *getPathParam)(struct jk_env *env, jk_ws_service_t *s, */
+ /* const char *name ); */
+
+ /** Extract the session id. It should use the servlet spec mechanism
+ * by default and as first choice, but if a separate module is doing
+ * user tracking we can reuse that.
+ */
+ /* char *(JK_METHOD *getSessionId)(struct jk_env *env, jk_ws_service_t *s); */
+
+ /** Extract the 'route' id, for sticky lb.
+ */
+ /* char *(JK_METHOD *getRoute)(struct jk_env *env, struct jk_ws_service *s); */
+
+ /** Serialize the request in a buffer.
+ */
+ /* int (JK_METHOD *serialize)(struct jk_env *env, struct jk_ws_service *s,
+ int protocol, struct jk_msg *msg ); */
+
+
};
#ifdef __cplusplus
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>