httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: http-redirect url gets corrupted in request_rec - apache 2
Date Mon, 10 Dec 2007 14:26:22 GMT
Hi Joe, Appreciate the response. thanks  This is similar to what someone else told me too (that
it may be a non-null terminated string issue). The point is how can I debug it further.I currently
am printing all the character portions of the request rec including the headers_out and err_headers_out
to log using fprintf statements to stderr. I think I tried breifly with ap_log_rerror too...
Will try again, but the basic redirection string seems to be getting properly from what I
can see visually in the logs. Is there any way to force null termination of these strings
or of say all parameters in the request rec. The other thing is that this occurs mainly after
restart and works on in say 5-10 attempts  but once it works once, it seems to work everytime
which is probably in line with your diagnosis too ...

----- Original Message -----
From: Joe Lewis <>
At: 12/10  9:16:12

> Hi, i have an authentication module that i am trying to port from 64 bit 
> linux to 32 bit solaris. The problem is that when the module redirects the 
> request to the authentication page, the URL seems to be getting corrupted when

> it is passed betwen the module and apache core.                               
>  For
> E.G; Within the module request_rec->headers_out is /loginPage/Somelogin.cgi
>  apache seems to actually redirect to:\xfb\xab\x98\xb0Page/Somelogin.cgi
>  i dont know why this is getting corrupted. Tried logging various parts of the
>  request_rec but didnt find anything. Does anyone have any ideas?
An idea : A variable in the same pool memory was written to that is too
big, overwriting data. I encountered this most often using strings that
were not NULL terminated as normal C programs expected. I would
typically place a couple of ap_log_rerror statements, printing the table
entry for headers_out that you are expecting. Once you narrow it down,
take a close look at the code that is used, and you should find your
specific problem. (If you have forced a size value in the conversion
from 32 bit to 64 bit, you may be overwriting a subsequent string that
you are trying to copy in).

Joseph Lewis <>
"Divide the fire, and you will sooner put it out." - Publius Syrus

View raw message