ap_http_method(r) not working
Hi folks, Any idea what would cause the ap:http:method context key that ap_http_method tries to query not to get set during an HTTPS request? In other words, the following #define from httpd.h: #define ap_http_method(r) (((r)-ctx != NULL ap_ctx_get((r)-ctx, ap::http::method) != NULL) ? ((char *)ap_ctx_get((r)-ctx, ap::http::method)) : http) always returns the defalt http. ap_default_port suffers a similar problem. The Apache I'm running is a 1.3 version obtained from an 'apache-ssl' Debian package. It handles HTTPS request just fine, but you'd never guess that from calling ap_http_method :-/ The binary's compile settings are below. Any help would be appreciated. Thanks! /usr/sbin/apache-ssl -V Server version: Apache/1.3.27 Ben-SSL/1.48 (Unix) Debian GNU/Linux Server built: Jun 26 2003 16:53:19 Server's Module Magic Number: 19990320:13 Server compiled with -D EAPI -D HAVE_MMAP -D HAVE_SHMGET -D USE_SHMGET_SCOREBOARD -D USE_MMAP_FILES -D NO_WRITEV -D HAVE_FCNTL_SERIALIZED_ACCEPT -D HAVE_SYSVSEM_SERIALIZED_ACCEPT -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D HARD_SERVER_LIMIT=4096 -D HTTPD_ROOT=/usr -D SUEXEC_BIN=/usr/lib/apache-ssl/suexec -D DEFAULT_PIDLOG=/var/run/apache-ssl.pid -D DEFAULT_SCOREBOARD=/var/run/apache-ssl.scoreboard -D DEFAULT_LOCKFILE=/var/run/apache-ssl.lock -D DEFAULT_ERRORLOG=/var/log/apache-ssl/error.log -D TYPES_CONFIG_FILE=/etc/mime.types -D SERVER_CONFIG_FILE=/etc/apache-ssl/httpd.conf -D ACCESS_CONFIG_FILE=/etc/apache-ssl/access.conf -D RESOURCE_CONFIG_FILE=/etc/apache-ssl/srm.conf --- Ken Kittlitz Vice-President, Javien Canada Inc. http://www.javien.com __ Apache Interface to OpenSSL (mod_ssl) www.modssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager[EMAIL PROTECTED]
Re: ap_http_method(r) not working
At 10:56 PM 9/25/2003 -0400, Cliff Woolley wrote: Anyway, certainly the reason this is not working right is that Apache-SSL (aka Ben-SSL) (as opposed to mod_ssl, which is the one supported by this mailing list) does not use EAPI at all, so it would not be calling the appropriate EAPI hooks at the right time to get those ctx variables set. Yup, that would explain it... thanks. Start from scratch with a stock Apache build (and get 1.3.28 while you're at it), and install mod_ssl from www.modssl.org. Then your EAPI will work right. Yeah, I normally use mod_ssl and have never had a problem; it's the customer who decided to install Ben-SSL on their system. Mea culpa for not realizing it was unrelated to mod_ssl. I'll try to show them the light ;-) --- Ken Kittlitz Vice-President, Javien Canada Inc. http://www.javien.com __ Apache Interface to OpenSSL (mod_ssl) www.modssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager[EMAIL PROTECTED]
Determining if request was made via HTTPS
Hi all, I'm writing an Apache module that needs to determine if a request came in via HTTP or HTTPS. Does mod_ssl provide some interface that other modules can use to determine this? Clearly, mod_cgi figures this out somehow, because it correctly sets the HTTPS environment variable, but I don't understand how it figures this out. I can't find anything in the request record that would let me tell the difference between an incoming HTTPS request and an HTTP one. Any help would be appreciated. Thanks! --- Ken Kittlitz Vice-President, Javien Canada Inc. http://www.javien.com __ Apache Interface to OpenSSL (mod_ssl) www.modssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager[EMAIL PROTECTED]