docs: function userAgentConnection(options) {
      var opts = options || {};
      assert.optionalObject(opts, 'options');
      assert.optionalObject(opts.userAgentRegExp, 'options.userAgentRegExp');
  
      var re = opts.userAgentRegExp;
  
      if (!re) {
          re = /^curl.+/;
      }
  
      function handleUserAgent(req, res, next) {
          var ua = req.headers['user-agent'];
  
          if (ua && re.test(ua)) {
              res.setHeader('Connection', 'close');
  
              if (req.method === 'HEAD') {
                  res.once('header',
                      res.removeHeader.bind(res, 'content-length'));
              }
          }
  
          next();
      }
  
      return (handleUserAgent);
  }