Hi all,
When FwdServer::_peer is set, HttpStateData constructor creates a new
special HttpRequest, overwriting the request pointer set in the parent
(ServerStateData) constructor to fwd->request.
This special HttpRequest sets the proper urlpath (which maybe different
from the original HttpRequest), the host (HttpRequest::SetHost/GetHost)
to be the peer hostname and inherits flags, protocol and method. Also
sets the HttpRequest::flags.proxying.
I believe this is originaly done to handle only the differences in
urlpath and the host. But this is has as result to have two
HttpRequests object in HttpStateData, but their difference is not clear,
and this is causes some bugs in http.cc. In patch preamble I am counting
4 possible bugs.
This patch removes the HttpStateData::orig_request member and uses
always the HttpStateData::request member.
If we decide that this patch is in the right direction probably we
should remove the ServerStateData::originalRequest() method too.
Regards,
Christos
This archive was generated by hypermail 2.2.0 : Tue Jun 28 2011 - 12:00:04 MDT