fix for closing channel, look for uri header as a hack around redirects