module ActionDispatch::Http::URL

def request_uri

WEBrick includes the full \URL. IIS leaves REQUEST_URI blank.
Returns the request URI, accounting for server idiosyncrasies.
def request_uri
  ActiveSupport::Deprecation.warn "Using #request_uri is deprecated. Use fullpath instead.", caller
  fullpath
end