robust functionality for GET and CONNECT