Both are valid requests and should go to the source base. david, could
you issue a pull request on bitbucket?
-g
Am 26.06.15 um 11:51 schrieb David Osborne:
Hi,
We've been looking at using Naviserver as a reverse proxy so it can
serve up fastpath requests, and also forward requests to an upstream
app server when required.
There was a couple of issues we came across that I'd like to ask about.
The proxy server code follows the same basic idea as Gustaf's post
here: http://sourceforge.net/p/naviserver/mailman/message/31063859/
1. Host header fields.
When we forward a request upstream using ns_ssl I couldn't find a way
of getting the Host header field to be forwarded untouched by ns_ssl.
I pass the query headers into ns_ssl which include a Host field
containing the host originally request by the client, and ns_ssl
always overwrites it with the value of the upstream Host. I don't
think this behaviour is wrong by any means, but, in Apache for
example, there is an option which turns on the behaviour we were
looking for - proxyPreserveHost
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypreservehost
Could there be scope for such an argument for ns_ssl (and ns_http as
well I guess) or is there a better way to deal with this?
Something like this:
https://bitbucket.org/davidqc/nsssl/branches/compare/davidqc/nsssl:tip%0Dnaviserver/nsssl:default#diff
2. Duplicate headers added by ns_respond.
Once upstream has replied to the proxy, the response is passed back to
the client using ns_respond with the headers we received from
upstream. What we are seeing is duplicate content-type and
content-length headers being received by the client.
It seems like this may be because Ns_ConnUpdateHeaders is using a case
sensitive Ns_SetUpdate to update the content-type header. So if
content-type already exists, it will add Content-Type as well.
Should this behaviour be that a case insensitive Ns_SetIUpdate is used
like the following or are there other ways around this?:
https://bitbucket.org/davidqc/naviserver/branches/compare/davidqc/naviserver:tip%0Dnaviserver/naviserver:default#diff
Thanks
--
David Osborne
Qcode Software Limited
http://www.qcode.co.uk
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel
--
Univ.Prof. Dr. Gustaf Neumann
WU Vienna
Institute of Information Systems and New Media
Welthandelsplatz 1, A-1020 Vienna, Austria
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel