Hello Ulric,
first thaks for your great program!
i think i found a but with rewrite_request. looking at our logfiles
i found that a lot of request dont get the "http_x_forwarded_for"
header set. looking at the pen.c code, i think i found the bug.
when a request comes in from a slow connections the read() in
copy_up() might not get the full header. so the following
rewrite_request() doenst detect the header, because of the still
missing termination (\n\n or \r\n\r\n). when copy_up() is called
again for the connection, rewrite_request() cant parse the header
because the methode (GET/POST etc..) and other stuff was already
read from the previous copy_up(). can you confirm this, or did i
misunderstand your code?
my suggestion would be to wait for the full header to be
available, parse the header and then forward the whole
stuff. if the full header isn't avaiable within some timeout,
the connections could/should be closed, the request hadn't
been parsed by the webserver anyway. as the link between
pen and the webserver normally is really fast, there shouldn't
be any performance hit, i think.
Regars,
Corin
-- _______________________________________________________________________ Netskin mailto:info@netskin.info Web-Programmierung Ihr Partner für die Entwicklung von Individualsoftware ...PHP3/4, Perl, VC++ 6, Delphi 5... Moltkestr. 34 D-79098 Freiburg _______________________________________________________________________ Möchten Sie mehr über uns erfahren ? Mobil: 0179-6634692, Telefon: 0761-3196306, Fax: 0761-3196306 www.find-mich.net · www.netskin.info · www.pferde24.comDiese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
This archive was generated by hypermail 2.1.2 : Thu Jul 01 2004 - 17:57:51 CEST