server - close socket, fix content type