Mod Cplusplus CVS committal
Author : johnksterling
Project : mod_cplusplus
Module : example
Dir : mod_cplusplus/example/handler
Modified Files:
test_auth.cpp
Log Message:
commit patch to fix a couple of problems: a) portability, b) uninitialized variables, and c) properly dealing with the fact that exceptions can be raised (autoptrs etc). Submitted by Jonathan Wakely <co...@co...>
===================================================================
RCS file: /cvsroot/modcplusplus/mod_cplusplus/example/handler/test_auth.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- test_auth.cpp 26 Jan 2005 09:09:59 -0000 1.6
+++ test_auth.cpp 7 Aug 2005 20:24:46 -0000 1.7
@@ -11,18 +11,19 @@
int AuthHandler::check_user_id(ApacheRequestRec *pRequest)
{
- char *require_user;
+ char *require_user=0;
int result = OK;
- const char *sent_pw;
+ const char *sent_pw=0;
result = pRequest->get_basic_auth_pw(&sent_pw);
- ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, NULL,
- "got pw: %s", sent_pw);
if( !result ) {
+ ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, NULL,
+ "got pw: %s", sent_pw);
+
require_user = get_cpp_var(pRequest, "user");
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, NULL,
- "got pw: %s", require_user);
+ "got require_user: %s", require_user);
if( require_user ) {
const char *sent_user = pRequest->user();
|