lib/utopia/localization.rb
# Set the Vary: header on the response to indicate that this response should include the header in the cache key.
Set the Vary: header on the response to indicate that this response should include the header in the cache key.
Set the Vary : header on the response to indicate that this response should include the header in the cache key .
def vary(env, response)
			headers = response[1].to_a
			headers << ['Vary', 'Accept-Language']
			if locale = env[CURRENT_LOCALE_KEY]
				headers['Content-Location'] = "/#{locale}" + env[Rack::PATH_INFO]
			end
			return response
		end
def vary ( env , response ) headers = response [ 1 ] . to_a headers << [ 'Vary' , 'Accept-Language' ] if locale = env [ CURRENT_LOCALE_KEY ] headers [ 'Content-Location' ] = "/#{locale}" + env [ Rack :: PATH_INFO ] end return response end
Set the Vary: header on the response to indicate that this response should include the header in the cache key.
Set the Vary : header on the response to indicate that this response should include the header in the cache key .
# This response was based on the Accept-Language header: # Althought this header is generally not supported, we supply it anyway as it is useful for debugging: # Set the Content-Location to point to the localized URI as requested:
env
response