[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] Apache C14 / Update 16644 - code fix



The problem with the last apache is that the
old EAPI fixes from mod_ssl isn't taking effect -
since the patching failed on the new modified
source code. And thus the function ap_http_method(r)
simply returned "http" (always), which made for
the funny (?) dir redirect bug experienced by many...


Here is a patch to be applied after mod_ssl's patches,
that redoes what the .rej patch tried to accomplish...

--- src/include/httpd.h.orig    Wed Jan 21 00:20:06 2004
+++ src/include/httpd.h    Wed Jan 21 00:27:40 2004
@@ -157,8 +157,13 @@
 #define ap_http_method(r) ap_os_http_method((void*)r)
 #define ap_default_port(r) ap_os_default_port((void*)r)
 #else
+#ifdef EAPI
+#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")
+#define ap_default_port(r)  (((r)->ctx != NULL && ap_ctx_get((r)->ctx,
"ap::default::port") != NULL) ? atoi((char *)ap_ctx_get((r)->ctx,
"ap::default::port")) : DEFAULT_HTTP_PORT)
+#else /* EAPI */
 #define ap_http_method(r)    "http"
 #define ap_default_port(r)    DEFAULT_HTTP_PORT
+#endif /* EAPI */
 #endif
 
 /* --------- Default user name and group name running standalone ----------
*/

(might have been line-breaked on the long #define lines,
should be 13 lines - 5 new lines to the old 8 ones)


The SRPM still suffers from the ancient problem that
it won't build outside Sun's environment, but that
can be fixed by building stackguard "egcs" (gcc)
from SRPM, and changing the location of SSL.

Here is a diff of the spec files changes, for RaQ 550:

# diff apache.spec.old apache.spec

54a55,57
> Patch42: apache-1.3.20-eapirestore.patch
> Packager: BlackSun, Inc.
> 
56a60
> BuildRequires: sg-egcs, openssl-devel
163a168
> export SSL_BASE="/usr"
182a188,192
> # Clean up after the mess that Sun did...
> cd ../apache_%{version}
> patch -p0 -i %{PATCH42}
> cd ../mod_perl-%{mod_perl_version}
> 


Takes a while for the new Sun engineering branch to get started, I suppose ?

The alternatives now is to rollback to C13, or patch C14 yourself (above)...
See http://cobalt-forum.sun.com/forum/index.php?t=msg&th=6083 for rollback.

--Anders

BlackSun, Inc.
http://www.blacksun.ca
Fast, Reliable Web Hosting