Fix to handle weird scenarios where the request urls contain query
parameters