(selector (car selector-list))
(arguments (cdr selector-list)))
(case (infer-selector-type selector)
- ((1) (serve-directory selector config))
+ ((1) (serve-directory selector remote-ip config))
((0) (serve-text-file selector config))
((7) (serve-query selector arguments remote-ip config))
(else (serve-binary-file selector config)))))
-(define (serve-directory selector config)
+(define (serve-directory selector remote-ip config)
(let ((file-name (make-pathname (list (config-root-dir config) selector)
gopher-index-file-name)))
(if (regular-file? file-name)
(if (eq? c #\,)
(begin
(read-char)
- (serve-record (read) selector config)
+ (serve-record (read) selector remote-ip config)
(read-line))
(serve-info-records (read-line)))
(loop (peek-char)))))))
(print type display-string "\t" selector "\t" host "\t" port "\r"))
((type display-string selector host)
(serve-record (list type display-string selector host 70)
- dir-selectorconfig))
+ dir-selector config))
((type display-string selector)
(serve-record (list type display-string
(make-pathname dir-selector selector)
(let-values (((in-port out-port id) (process command)))
(serve-info-records (string-chomp (read-string #f in-port) "\n"))))))
-(define (serve-expression expression path config)
+(define (serve-expression expression dir-selector config)
(with-selector-dir
dir-selector config
(lambda ()