Serve the server pem with GET requests.
184561
def do_GET(self):  # pylint: disable=g-bad-name
    """"""
    self._IncrementActiveCount()
    try:
      if self.path.startswith("/server.pem"):
        stats_collector_instance.Get().IncrementCounter(
            "frontend_http_requests", fields=["cert", "http"])
        self.ServerPem()
      elif self.path.startswith(self.static_content_path):
        stats_collector_instance.Get().IncrementCounter(
            "frontend_http_requests", fields=["static", "http"])
        self.ServeStatic(self.path[len(self.static_content_path):])
    finally:
      self._DecrementActiveCount()
115175
function serve(server, req, callback) {
		source.getTile(req.z, req.x, req.y, function(err, buffer) {
			if (err) return callback(err);
			var headers = {'Content-Type': 'application/x-protobuf'};
			if (options.compression === 'gzip') {
				headers['Content-Encoding'] = 'gzip';
			}
			callback(null, buffer, headers);
		});
	}
1222143
def __Get(self, path, request, headers):
        
        return synchronized_request.SynchronizedRequest(self,
                                                        request,
                                                        self._global_endpoint_manager,
                                                        self.connection_policy,
                                                        self._requests_session,
                                                        'GET',
                                                        path,
                                                        None,
                                                        None,
                                                        headers)
308167
public function serve()
    {
        $request = Request::createFromGlobals();
        $response = $this->handleRequest($request);

        if ($this->liveReload) $this->injectLiveReload($response);

        $response->send();
    }
776968
def handle_get(self):
        

        code = 400
        message, explain = \
                 BaseHTTPServer.BaseHTTPRequestHandler.responses[code]

        response = BaseHTTPServer.DEFAULT_ERROR_MESSAGE % { #@UndefinedVariable
             'code' : code,
             'message' : message,
             'explain' : explain
            }
        sys.stdout.write('Status: %d %s\n' % (code, message))
        sys.stdout.write('Content-Type: text/html\n')
        sys.stdout.write('Content-Length: %d\n' % len(response))
        sys.stdout.write('\n')

        sys.stdout.write(response)
144565
def do_GET(self):
        """"""
        thread_local.clock_start = get_time()
        thread_local.status_code = 200
        thread_local.message = None
        thread_local.headers = []
        thread_local.end_headers = []
        thread_local.size = -1
        thread_local.method = 'GET'
        try:
            self.cross_origin_headers()
            if self.handle_special(True, 'GET'):
                return
            SimpleHTTPRequestHandler.do_GET(self)
        except PreventDefaultResponse as pdr:
            if pdr.code:
                self.send_error(pdr.code, pdr.msg)
        except (KeyboardInterrupt, SystemExit):
            raise
        except Exception:
            self.handle_error()
777894
function serve(req, res) {
  var responseIsArray = Array.isArray(res.entityResponse);
  util.invariant(responseIsArray, 'Response values are required.');

  res.json({ values: res.entityResponse });
}
162048
def do_GET(self):
        
        if self.path.startswith(args.serve_url):
            res = None
            log_res = None
            mode = None
            params = urlparse.parse_qs(self.path[len(args.serve_url):])
            if "otp" in params:
                if args.mode_short_otp:
                    # YubiKey internal db OTP in KSM mode
                    mode = 'YubiKey OTP (short)'
                    res = validate_yubikey_otp_short(self, params)
                elif args.mode_otp:
                    # YubiKey internal db OTP validation 2.0
                    mode = 'YubiKey OTP'
                    res = validate_yubikey_otp(self, params)
                    #status = [x for x in res.split('\n') if x.startswith("status=")]
                    #if len(status) == 1:
                    #    res = status[0][7:]
                    log_res = '&'.join(res.split('\n'))
                else:
                    res = "ERR 'otp/otp2' disabled"
            elif "hotp" in params:
                if args.mode_hotp:
                    mode = 'OATH-HOTP'
                    res = validate_oath_hotp(self, params)
                else:
                    res = "ERR 'hotp' disabled"
            elif "totp" in params:
                if args.mode_totp:
                    mode = 'OATH-TOTP'
                    res = validate_oath_totp(self, params)
                else:
                    res = "ERR 'totp' disabled"
            elif "pwhash" in params:
                if args.mode_pwhash:
                    mode = 'Password hash'
                    res = validate_pwhash(self, params)
                else:
                    res = "ERR 'pwhash' disabled"

            if not log_res:
                log_res = res

            self.log_message("%s validation result: %s -> %s", mode, self.path, log_res)

            if res != None:
                self.send_response(200)
                self.send_header('Content-type', 'text/plain')
                self.end_headers()
                self.wfile.write(res)
                self.wfile.write("\n")
            else:
                self.log_error ("No validation result to '%s' (responding 403)" % (self.path))
                self.send_response(403, 'Forbidden')
                self.end_headers()
        else:
            self.log_error ("Bad URL '%s' - I'm serving '%s' (responding 403)" % (self.path, args.serve_url))
            self.send_response(403, 'Forbidden')
            self.end_headers()
1272681
function serve() {
	var browserSync = require('browser-sync');

	browserSync({
		server: {
			baseDir: cfg.destination
		},
		ui: false,
		online: false,
		open: false,
		minify: false
	});

	gulp.watch(['*'], {cwd: cfg.destination}).on('change', browserSync.reload);
}
737242
def serve
      server_options = {}
      options.each { |k, v| server_options[k.to_sym] = v }
      server_options[:server] = {}
      [:port, :handler, :host].each do |k|
        server_options[:server][k] = server_options.delete(k) if server_options.key?(k)
      end

      @project.server.set_options(server_options[:server])
    end
838779
def client_get(self, url, **kwargs):
        """"""
        response = requests.get(self.make_url(url), headers=self.headers)
        if not response.ok:
            raise Exception(
                '{status}: {reason}.\nCircleCI Status NOT OK'.format(
                    status=response.status_code, reason=response.reason))
        return response.json()
438641
def _serve_file(self, path):
        
        static = PkgResourcesParser('pylons', 'pylons')
        request.environ['PATH_INFO'] = '/%s' % path
        return static(request.environ, self.start_response)
752492
def serve(handler, sock_path, timeout=UNIX_SOCKET_TIMEOUT):
    
    ssh_version = subprocess.check_output(['ssh', '-V'],
                                          stderr=subprocess.STDOUT)
    log.debug('local SSH version: %r', ssh_version)
    environ = {'SSH_AUTH_SOCK': sock_path, 'SSH_AGENT_PID': str(os.getpid())}
    device_mutex = threading.Lock()
    with server.unix_domain_socket_server(sock_path) as sock:
        sock.settimeout(timeout)
        quit_event = threading.Event()
        handle_conn = functools.partial(server.handle_connection,
                                        handler=handler,
                                        mutex=device_mutex)
        kwargs = dict(sock=sock,
                      handle_conn=handle_conn,
                      quit_event=quit_event)
        with server.spawn(server.server_thread, kwargs):
            try:
                yield environ
            finally:
                log.debug('closing server')
                quit_event.set()
1341383
def server(port):
    """"""
    args = ['python', 'manage.py', 'runserver']
    if port:
        args.append(port)
    run.main(args)
1097872
def _api_get(path, server=None):
    '''
    
    '''
    server = _get_server(server)
    response = requests.get(
            url=_get_url(server['ssl'], server['url'], server['port'], path),
            auth=_get_auth(server['user'], server['password']),
            headers=_get_headers(),
            verify=False
    )
    return _api_response(response)
1125093
def do_serve(self, repo_name):
        '''
        
        '''
        self.abort_on_nonexisting_effective_repo(repo_name, 'serve')

        repo = self.network.get_repo(repo_name)
        repo.serve()
314434
def do_GET(self):
    """"""
    if not self._client_allowed():
      return

    try:
      (_, _, path, query, _) = urlsplit(self.path)
      params = parse_qs(query)
      # Give each handler a chance to respond.
      for prefix, handler in self._GET_handlers:
        if self._maybe_handle(prefix, handler, path, params):
          return
      # If no path specified, default to showing the list of all runs.
      if path == '/':
        self._handle_runs('', {})
        return

      content = 'Invalid GET request {}'.format(self.path).encode('utf-8'),
      self._send_content(content, 'text/html', code=400)
    except (IOError, ValueError):
      pass