# File lib/stomp_server/protocols/http.rb, line 105
    def create_response(code,response_text)
      response = ''
      @headers_out['Content-Length'] = response_text.size

      case code
      when '200'
        response << "HTTP/1.1 200 OK\r\n"
      when '500'
        response << "HTTP/1.1 500 Server Error\r\n"
      when '404'
        response << "HTTP/1.1 404 Message Not Found\r\n"
      end
      @headers_out.each_pair do |key, value|
        response << "#{key}:#{value}\r\n"
      end
      response << "\r\n"
      response << response_text
      send_data(response)
      unbind if @request.params['HTTP_CONNECTION'] == 'close'
    end