From: Sasan D. <sa...@cs...> - 2004-08-10 14:47:21
|
Hi Folks, I'm using the Squid ICAP client and the Python server. I have implemented a proxylet that in its modGetRequest method, if some checks are met, can return the complete response to the HTTP request. Here's that piece of code: out = plreq.getResponseOutputStream() out.write("HTTP/1.0 200 OK\r\n") out.write("Content-type: text/html\r\n") out.write("Connection: close\r\n") out.write("\r\n") out.write("<HTML>\r\n") out.write("<BODY><P>Hi there!!!</P></BODY>") out.write("</HTML>\r\n") return ProxyletStatus.PROXYLET_OK The other parts of this proxylet work fine, but this one has no eefect. When I point the browser to a URL, going through the proxy, the browser gets the following piece of HTML back: <html><body></body></html> Here is the corresponding rules.xml configuration: <rule processing-point="1"> <property name="Request-Path" matches=".*"> <action>translatePl</action> </property> </rule> (FOr testing purposes, I just editted tanslatePl.py.) What am I doing wrong? Should I return a different return value? I am writing the wrong HTTP headers? ... ? Is this not implemented yet? Any help would be strongly appreciated. Regards, --Sasan |