(selector (car selector-list))
(arguments (cdr selector-list)))
(case (infer-selector-type selector)
- ((1) (serve-directory selector remote-ip config))
+ ((1) (serve-directory selector 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 remote-ip config)
+(define (serve-directory selector 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 remote-ip config)
+ (serve-record (read) selector config)
(read-line))
(serve-info-records (read-line)))
(loop (peek-char)))))))
(config-port-set! config (string->number (caddr args))))
(run-server config)))))))
-;; (main)
+(main)
-(define (test)
- (run-server (make-config "gopher-root" "localhost" 70 #t)))
+;; (define (test)
+;; (run-server (make-config "gopher-root" "localhost" 70 #t)))
;; (test)