Adding the port trailing query slash stripper

Change-Id: I86ea91cca4dcb3abf35d7acbbfef3aa39edd336f