expected reply was missing last character of query string