Author: wrowe Date: Sat Jan 1 18:18:16 2005 New Revision: 123867 URL: http://svn.apache.org/viewcvs?view=rev&rev=123867 Log:
Handle GetProtocol correctly (and consistant with ASP.NET conventions.) Modified: httpd/mod_aspdotnet/trunk/Apache.Web/WorkerRequest.h Modified: httpd/mod_aspdotnet/trunk/Apache.Web/WorkerRequest.h Url: http://svn.apache.org/viewcvs/httpd/mod_aspdotnet/trunk/Apache.Web/WorkerRequest.h?view=diff&rev=123867&p1=httpd/mod_aspdotnet/trunk/Apache.Web/WorkerRequest.h&r1=123866&p2=httpd/mod_aspdotnet/trunk/Apache.Web/WorkerRequest.h&r2=123867 ============================================================================== --- httpd/mod_aspdotnet/trunk/Apache.Web/WorkerRequest.h (original) +++ httpd/mod_aspdotnet/trunk/Apache.Web/WorkerRequest.h Sat Jan 1 18:18:16 2005 @@ -220,11 +220,22 @@ virtual String* GetProtocol(void) { - // TODO: HTTPS when appropriate +#if MODULE_MAGIC_NUMBER_MAJOR >= 20050101 + // Fixes in httpd-2.1-dev + const char __nogc *method = ap_http_scheme(rr); +#else + const char __nogc *method = ap_http_method(rr); +#endif + String *scheme(method); + + // For some silly reason, the ASP.NET team thought that schemes + // are upper case entities; + scheme = scheme->ToUpper(nullCulture); #ifdef _DEBUG - LogRequestError(L"GetProtocol: returns HTTP", APLOG_DEBUG, 0); + String *schemeMsg = String::Concat(L"GetProtocol: returns ", scheme); + LogRequestError(schemeMsg, APLOG_DEBUG, 0); #endif - return new String(L"HTTP"); + return scheme; } virtual String* GetRemoteAddress(void)