FMA
Mar 26, 2018Nimbostratus
Replace Host part in HTTP::Location
Hello, guys. I'm trying to find a way to perform manipulation with HTTP::header Location.
1. Web-browser requests https://abc.com
2. Web-server replies with HTTP/301 Location: https://xyz.com/{$URI} (URI part might change when browsing)
3. I need to have HTTP::Location modified to https://abc.com/{$URI} (whatever was put in 2)
I was trying to achieve this with getfield with "/" as delimiter to catch URI part, but this gets broken as number of slashes in Location might increase 😕
Thanks!