Hi *,
again about this problem of mine... using firebug and thanks to what
suggested by pbreit I have reconstructed almost averythig is done by the
proxy script that runs under apache as cgi[1]. There's only one single
problem I cannot figure out how to solve it.
In the following lines:
# print content type header
61 i = y.info()
62 if i.has_key("Content-Type"):
63 print "Content-Type: %s" % (i["Content-Type"])
64 else:
65 print "Content-Type: text/plain"
66 print
67
68 print y.read()
69
70 y.close()
the three print at lines 65, 66 and 68 couse a sort of double return
that I cannot reproduce with a function under web2py because the browser
that receive the output reads the first print as the header, the second
as a EOF signal and the third as the body of the replay.
Perfomrming
response = "Content-Type: %s\n\n%s" % (i["Content-Type"],
y.read())
as suggested both the header and the body are read together as a whole
body because "\n" is actualy a character. Consider that the header is
necessary for a right interpretation from the browser that will receive
my replay.
I've already tryed to return an array defining:
header = "Content-Type: %s" % (i["Content-Type"],)
body = y.read()
and than:
return header, body
but it does not do what expected
thank you very much
Manuele
[1] http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#ProxyHost