On 3/17/10 10:16 AM, Felix Meschberger wrote: > Hi, > > On 17.03.2010 15:09, Justin Edelson wrote: >> On 3/17/10 9:49 AM, Felix Meschberger wrote: >>>> String host = request.getHeader("Host"); >>> >>> (NB this is what request.getServerName() reports; I would prefer to use >>> the API) >> (I seem to recall running into trouble with request.getServerName() and >> CDNs, so I just got into the habit of using the Host header.) > > Just curious: would that be formatting issues which the servlet > container could not resolve correctly ? This is what I remember:
With our CDN at the time, where: CDN ----> Web Server ----> App Server User requested www.site.com, CDN requested origin.www.site.com. request.getServerName() = origin.www.site.com request.getHeader("Host") = www.site.com Justin > > Regards > Felix