Handle Common Gateway Interface requests and responses