Re: cvs commit: jakarta-tomcat-connectors/jk/native2/server/apach e2 mod_jk2.c
Glenn Nielsen wrote: > On Thu, Mar 04, 2004 at 05:49:21PM +0100, jean-frederic clere wrote: > >>jean-frederic clere wrote: >> >>>[EMAIL PROTECTED] wrote: >>> >>> jfclere 2004/03/03 09:55:32 Modified:jk/native2/server/apache2 mod_jk2.c Log: Remove jk2_translate... It is still not 100% OK: - LocationMatch does not work. - Some _not_found ends in Tomcat when using mod_dav. >>> >>> >>>That is still not OK. I will go on later. Sorry :-( >> >>Now it looks better. The only thing I have removed is the logic for mod_dir >>Tomcat will do it if needed. > > > Does that mean that Tomcat would have to resovlve identification > of the directory index file? I do not see how the code I removed helps to do it. I am able to see that the index.html.var is requested but it is not displayed. (when mapping /examples/jsp/* for example). > > It would be nice to keep this on the apache side when someone > uses Alias or JkAutoAlias to serve static pages, fourwarding > and DirectoryIndex files which are *.jsp to Tomcat of course. By mapping "*.jsp" to Tomcat that works. > > Glenn > > signature.asc Description: OpenPGP digital signature
Re: cvs commit: jakarta-tomcat-connectors/jk/native2/server/apach e2 mod_jk2.c
Henri Gomez wrote: > jean-frederic clere wrote: > >> Glenn Nielsen wrote: >> >>> On Thu, Mar 04, 2004 at 05:49:21PM +0100, jean-frederic clere wrote: >>> >>> jean-frederic clere wrote: > [EMAIL PROTECTED] wrote: > > > >> jfclere 2004/03/03 09:55:32 >> >> Modified:jk/native2/server/apache2 mod_jk2.c >> Log: >> Remove jk2_translate... It is still not 100% OK: >> - LocationMatch does not work. >> - Some _not_found ends in Tomcat when using mod_dav. > > > > That is still not OK. I will go on later. Sorry :-( Now it looks better. The only thing I have removed is the logic for mod_dir Tomcat will do it if needed. >>> >>> >>> >>> Does that mean that Tomcat would have to resovlve identification >>> of the directory index file? >> >> >> >> Yes. >> >> >>> It would be nice to keep this on the apache side when someone >>> uses Alias or JkAutoAlias to serve static pages, fourwarding >>> and DirectoryIndex files which are *.jsp to Tomcat of course. >> >> >> >> That is easy to put back the logic ;-) > > > Will we back port the jk2 modification to jk ? After releasing jk2 ;-) BTW: I am still not happy with PR 21546: "JkSet uri:/*.jsp.group ajp13:" If is "host/context" that will work if it is "host/" it won't because "*.jsp" will be mapped by jk2_map_to_storage. Ideas? > > BTW, the jk2 2.0.4 should be delayed at least one week again but it's > worth the wait... > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > signature.asc Description: OpenPGP digital signature
Re: cvs commit: jakarta-tomcat-connectors/jk/native2/server/apach e2 mod_jk2.c
jean-frederic clere wrote: Glenn Nielsen wrote: On Thu, Mar 04, 2004 at 05:49:21PM +0100, jean-frederic clere wrote: jean-frederic clere wrote: [EMAIL PROTECTED] wrote: jfclere 2004/03/03 09:55:32 Modified:jk/native2/server/apache2 mod_jk2.c Log: Remove jk2_translate... It is still not 100% OK: - LocationMatch does not work. - Some _not_found ends in Tomcat when using mod_dav. That is still not OK. I will go on later. Sorry :-( Now it looks better. The only thing I have removed is the logic for mod_dir Tomcat will do it if needed. Does that mean that Tomcat would have to resovlve identification of the directory index file? Yes. It would be nice to keep this on the apache side when someone uses Alias or JkAutoAlias to serve static pages, fourwarding and DirectoryIndex files which are *.jsp to Tomcat of course. That is easy to put back the logic ;-) Will we back port the jk2 modification to jk ? BTW, the jk2 2.0.4 should be delayed at least one week again but it's worth the wait... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-connectors/jk/native2/server/apach e2 mod_jk2.c
Glenn Nielsen wrote: > On Thu, Mar 04, 2004 at 05:49:21PM +0100, jean-frederic clere wrote: > >>jean-frederic clere wrote: >> >>>[EMAIL PROTECTED] wrote: >>> >>> jfclere 2004/03/03 09:55:32 Modified:jk/native2/server/apache2 mod_jk2.c Log: Remove jk2_translate... It is still not 100% OK: - LocationMatch does not work. - Some _not_found ends in Tomcat when using mod_dav. >>> >>> >>>That is still not OK. I will go on later. Sorry :-( >> >>Now it looks better. The only thing I have removed is the logic for mod_dir >>Tomcat will do it if needed. > > > Does that mean that Tomcat would have to resovlve identification > of the directory index file? Yes. > > It would be nice to keep this on the apache side when someone > uses Alias or JkAutoAlias to serve static pages, fourwarding > and DirectoryIndex files which are *.jsp to Tomcat of course. That is easy to put back the logic ;-) > > Glenn > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > signature.asc Description: OpenPGP digital signature
Re: cvs commit: jakarta-tomcat-connectors/jk/native2/server/apach e2 mod_jk2.c
On Thu, Mar 04, 2004 at 05:49:21PM +0100, jean-frederic clere wrote: > jean-frederic clere wrote: > > [EMAIL PROTECTED] wrote: > > > >>jfclere 2004/03/03 09:55:32 > >> > >> Modified:jk/native2/server/apache2 mod_jk2.c > >> Log: > >> Remove jk2_translate... It is still not 100% OK: > >> - LocationMatch does not work. > >> - Some _not_found ends in Tomcat when using mod_dav. > > > > > > That is still not OK. I will go on later. Sorry :-( > > Now it looks better. The only thing I have removed is the logic for mod_dir > Tomcat will do it if needed. Does that mean that Tomcat would have to resovlve identification of the directory index file? It would be nice to keep this on the apache side when someone uses Alias or JkAutoAlias to serve static pages, fourwarding and DirectoryIndex files which are *.jsp to Tomcat of course. Glenn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-connectors/jk/native2/server/apach e2 mod_jk2.c
jean-frederic clere wrote: > [EMAIL PROTECTED] wrote: > >>jfclere 2004/03/03 09:55:32 >> >> Modified:jk/native2/server/apache2 mod_jk2.c >> Log: >> Remove jk2_translate... It is still not 100% OK: >> - LocationMatch does not work. >> - Some _not_found ends in Tomcat when using mod_dav. > > > That is still not OK. I will go on later. Sorry :-( Now it looks better. The only thing I have removed is the logic for mod_dir Tomcat will do it if needed. Cheers Jean-Frederic > > >> >> Revision ChangesPath >> 1.72 +27 -30jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c >> >> Index: mod_jk2.c >> === >> RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c,v >> retrieving revision 1.71 >> retrieving revision 1.72 >> diff -u -r1.71 -r1.72 >> --- mod_jk2.c 3 Mar 2004 09:15:48 - 1.71 >> +++ mod_jk2.c 3 Mar 2004 17:55:31 - 1.72 >> @@ -42,7 +42,6 @@ >>*/ >> static int dirCounter=0; >> >> - >> #define JK_HANDLER ("jakarta-servlet2") >> #define JK_MAGIC_TYPE ("application/x-jakarta-servlet2") >> >> @@ -662,9 +661,11 @@ >> int rc1; >> >> uriEnv=ap_get_module_config( r->request_config, &jk2_module ); >> +if (uriEnv==NULL) >> + uriEnv=ap_get_module_config( r->per_dir_config, &jk2_module ); >> >> /* not for me, try next handler */ >> -if(uriEnv==NULL || strcmp(r->handler,JK_HANDLER)) >> +if(uriEnv==NULL || !strcmp(r->handler,JK_HANDLER)) >> return DECLINED; >> >> /* If this is a proxy request, we'll notify an error */ >> @@ -854,38 +855,35 @@ >> /* bypass the directory_walk and file_walk for non-file requests */ >> static int jk2_map_to_storage(request_rec *r) >> { >> -jk_uriEnv_t *uriEnv=ap_get_module_config( r->request_config, &jk2_module ); >> - >> -if( uriEnv != NULL ) { >> - >> -/* First find just the name of the file, no directory */ >> -r->filename = (char *)apr_filepath_name_get(r->uri); >> +jk_uriEnv_t *uriEnv; >> +jk_env_t *env; >> >> -/* Only if sub-request for a directory, most likely from mod_dir */ >> -if (r->main && r->main->filename && >> -!*apr_filepath_name_get(r->main->filename)){ >> - >> -/* The filename from the main request will be set to what should >> - * be picked up, aliases included. Tomcat will need to know about >> - * those aliases or things won't work for them. Normal files >> - * should be fine. */ >> - >> -/* Need absolute path to stat */ >> -if (apr_filepath_merge(&r->filename, >> - r->main->filename, r->filename, >> - APR_FILEPATH_SECUREROOT | >> - APR_FILEPATH_TRUENAME, >> - r->pool) >> -!= APR_SUCCESS){ >> - return DECLINED; /* We should never get here, very bad */ >> -} >> +if (r->proxyreq || workerEnv==NULL) { >> +return DECLINED; >> +} >> + >> +/* From something like [uri:/examples/STAR] in workers2.properties */ >> +env = workerEnv->globalEnv->getEnv( workerEnv->globalEnv ); >> +uriEnv=workerEnv->uriMap->mapUri(env, workerEnv->uriMap, >> +ap_get_server_name(r), >> +ap_get_server_port(r), >> +r->uri); >> >> -/* Stat the file so that mod_dir knows it's there */ >> -apr_stat(&r->finfo, r->filename, APR_FINFO_TYPE, r->pool); >> +if (uriEnv!=NULL && uriEnv->workerName != NULL) { >> +ap_set_module_config( r->request_config, &jk2_module, uriEnv ); >> +r->handler=JK_HANDLER; >> +workerEnv->globalEnv->releaseEnv( workerEnv->globalEnv, env ); >> + >> +/* This could be a sub-request, possibly from mod_dir */ >> +if(r->main){ >> +ap_set_module_config( r->main->request_config, &jk2_module, uriEnv ); >> +r->main->handler=JK_HANDLER; >> } >> >> return OK; >> } >> + >> +workerEnv->globalEnv->releaseEnv( workerEnv->globalEnv, env ); >> return DECLINED; >> } >> >> @@ -897,7 +895,6 @@ >> /* Force the mpm to run before us and set the scoreboard image */ >> ap_hook_child_init(jk2_child_init, NULL, NULL, APR_HOOK_LAST); >> >> -ap_hook_translate_name(jk2_translate, NULL, NULL, APR_HOOK_MIDDLE); >> ap_hook_map_to_storage(jk2_map_to_storage, NULL, NULL, APR_HOOK_MIDDLE); >> } >> >> >> >> >> >>- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > signature.asc Description: OpenPGP digital signature
RE: cvs commit: jakarta-tomcat-connectors/jk/native2/server/apach e2 mod_jk2.c
What's so bad about requiring the user to specify a port for all mappings with a virtual host in workers2.properties ? You may be able to support one default port (80 or 443), but not both without adding additional config options in worker2.properties - or am I wrong ? Although r->server->port may be 0, ap_get_server_port(r) may AFAIK not. It is probably not a good idea to use req->hostname by default either, because it is supplied by the client. For example (with req->hostname) to have mod_jk2 serve: http://localhost/context/blah and http://127.0.0.1/context/blah you will need to add a lot of extra configuration to workers2.properties (I don't think the alias option works yet so duplication is needed). Using req->server->server_hostname or ap_get_server_name(req) is IMO better. ap_get_server_name(req) defaults to request->server->server_hostname but can be configured (USE_CANONICAL_NAME) to return request->hostname or even do a reverse dns-lookup of the connection address. So why not: Index: mod_jk2.c === RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2. c,v retrieving revision 1.52 diff -u -r1.52 mod_jk2.c --- mod_jk2.c 22 Sep 2002 09:35:46 - 1.52 +++ mod_jk2.c 22 Sep 2002 19:46:07 - @@ -679,8 +679,10 @@ */ uriEnv = workerEnv->uriMap->mapUri(env, workerEnv->uriMap, -r->server->is_virtual ? r->hostname : NULL, -r->uri ); +r->server->is_virtual ? +apr_psprintf(r->pool,"%s:%d", +ap_get_server_name(r), +ap_get_server_port(r)) : NULL, r->uri ); if( uriEnv== NULL || uriEnv->workerName == NULL) { workerEnv->globalEnv->releaseEnv( workerEnv->globalEnv, env ); -Original Message- From: Ignacio J. Ortega [mailto:[EMAIL PROTECTED]] Sent: 22. september 2002 20:07 To: 'Tomcat Developers List'; '[EMAIL PROTECTED]' Subject: RE: cvs commit: jakarta-tomcat-connectors/jk/native2/server/apach e2 mod_jk2.c I agree that my patch is buggy in the case of a request coming from 80 or 443, but if we want to support port bases V hosting, we need to pass it down, if not [uri:www.something.com:8080/somecontext] Definitely will not work (this not works now i.e).. so to pass the port as part of the hostname is needed when port is different from 80 and 443.. FOr the other 2 the is_virtual and the changes inside the mapper.. The initial idea was to do what isapi_redirector from jk does right now, in jk i_r.dll there are 2 types of mappings: 1) globals ( for all VS and Default ) and 2) particular ( for a concrete VS or Default ) This needs to do 2 passes for the mapper, one for the particular mappings with host+port ( if not 80 or 443 ) as vhost, and if none found other for the Global mappings with NULL as vhost.. that is what isapi does.. For the mapper, i was trying to need only one pass in the mapper, but after looking at the code, it was buggy, as VS request from a registered vhost, never will be mapped to anything outside of that vhost, so it's need to do the two passes.. So my grandtotal for my first commits after months is 2 bugs in 2 commits, nice startup, thanks Mladen.. ;) Saludos , Ignacio J. Ortega > -Mensaje original- > De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Enviado el: 22 de septiembre de 2002 11:36 > Para: [EMAIL PROTECTED] > Asunto: cvs commit: > jakarta-tomcat-connectors/jk/native2/server/apache2 > mod_jk2.c > > > mturk 2002/09/22 02:35:46 > > Modified:jk/native2/server/apache2 mod_jk2.c > Log: > Cannot use the hostname:server_port cause the port is 0 for all > host:80 requests. Also is_virtual is used for separating default and > virtual hosts. In case of default server host the hostname provided > to uriMap _MUST_ be NULL to be able to map the default uri:/ > > Revision ChangesPath > 1.52 +2 -2 > jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c > > Index: mod_jk2.c > === > RCS file: > /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/ > mod_jk2.c,v > retrieving revision 1.51 > retrieving revision 1.52 > diff -u -r1.51 -r1.52 > --- mod_jk2.c 22 Sep 2002 02:50:42 - 1.51 > +++ mod_jk2.c 22 Sep 2002 09:35:46 - 1.52 > @@ -679,7 +679,7 @@ >*/ > >uriEnv = workerEnv->uriMap->mapUri(env, workerEnv->uriMap, > - > apr_psprintf(r->pool,"%s:%d",r->hostname,r->server->port), > +r->server->is_vi