replying to this thread as it's the one designated for feedback. First, the minimalist and naive one: use StringBuilder instead of StringBuffer for a little extra speed :)
Then the one I've been thinking about: stating that "The current "proxification" mechanism will be a a URLMangler changing only the baseURL." may be oversimplistic. That will only work for URL's programatically created, but the current proxification deals with those that are not. What ReverseProxyFilter does can basically be reduced to a two-step process, for each line of filtered content (html, css, javascript, etc): translatedLine = translatedLine.replaceAll(serverBase, proxyBase); translatedLine = translatedLine.replaceAll(context, proxyContext); It is not like for each URL found it's calling RequestUtils, and I think doing so to call RequestUtils.buildURL _may_ be overkiller. More over, I'm not sure it'll work since much of them lack base/context and are only <path>?<params> What I've been trying to figure out is how much of ReverseProxyFilter's functionality could be abstracted out to this URLMangler. The reverse proxy does only care about base and context. Currently it has effect only over two aspects of URLs: base (protocol, server, port) and context (like in servlet context for the web app). With this new callbacks it'll need to take care also of path and params, so it can change "../wms?request=GetCapabilities? into "../wms?request=GetCapabilities&myCustomToken=something" Calling RequestUtils.buildURL for each and every URL found in html/js/css resources may require a smarter, more structured (and slow) parsing of the content in order to actually extract the URL's instead of a simple String.replaceAll... So I guess we'll end up calling RequestUtils.buildURL(GeoServer.getProxyBaseUrl()) as it's being done right now and then extend the servlet filter so it appends also any extra CGI parameters added by the callbacks? Aside, the EXTERNAL, RESOURCE, SERVICE "enum" might be augmented with an UNKNOWN? (like in when "reverse-proxifying" I don't know and don't really care?) My 2c.- Gabriel ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Geoserver-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-devel
