You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@knox.apache.org by Jeffrey Rodriguez <je...@yahoo.com> on 2015/03/22 13:37:27 UTC
How can you rewrite a relative URL from an HTML body?
I am making a call to a URL which returns an html page. That page has resources mapped to a relative path /static.
e.g.if role=TEST url=http://host:port/page gets a page which contains references to /staticso those class are rewritten to:
http://host:port/page -> http://gateway_host:gateway_port/gateway/gateway_deployment/page
but page have relative resouce references to "/static"
Those requests are then process as http://gateway_host:gateway_port/gateway/static (Since resouce in page is relative)
Would like to have the body resource re-written to
http://gateway_host:gateway_port/gateway/gateway/gateway_deployment/static
Re: How can you rewrite a relative URL from an HTML body?
Posted by Kevin Minder <ke...@hortonworks.com>.
Hi Jeffrey,
Can you provide a bit more context about the original HTML response. Specifically I'm looking for a "mock up" of the HTML to see where this URL is found. You should know that the HTML support in Knox is isn't as complete as for JSON and XML as we have focused first on REST API support. That being said I if you provide the example I'll see if it can support your use case.
Kevin.
From: Jeffrey Rodriguez <je...@yahoo.com>>
Reply-To: "user@knox.apache.org<ma...@knox.apache.org>" <us...@knox.apache.org>>, Jeffrey Rodriguez <je...@yahoo.com>>
Date: Sunday, March 22, 2015 at 7:37 AM
To: "user@knox.apache.org<ma...@knox.apache.org>" <us...@knox.apache.org>>
Subject: How can you rewrite a relative URL from an HTML body?
I am making a call to a URL which returns an html page. That page has resources mapped to a relative path /static.
e.g.
if role=TEST
url=http://host:port/page gets a page which contains references to /static
so those class are rewritten to:
http://host:port/page -> http://gateway_host:gateway_port/gateway/gateway_deployment/page
but page have relative resouce references to "/static"
Those requests are then process as http://gateway_host:gateway_port/gateway/static (Since resouce in page is relative)
Would like to have the body resource re-written to
http://gateway_host:gateway_port/gateway/gateway/gateway_deployment/static