diff --git a/collects/handin-server/status-web-root/servlets/status.ss b/collects/handin-server/status-web-root/servlets/status.ss index 374a0993e5..2c36e73ef4 100644 --- a/collects/handin-server/status-web-root/servlets/status.ss +++ b/collects/handin-server/status-web-root/servlets/status.ss @@ -239,7 +239,7 @@ (cond [html? #"text/html"] [wxme? #"application/data"] [else #"text/plain"]) - `((Content-length . ,(number->string (bytes-length data))) + `((Content-Length . ,(number->string (bytes-length data))) ,@(if wxme? `((Content-Disposition . diff --git a/collects/handin-server/utils.ss b/collects/handin-server/utils.ss index 73bcd916ac..408ee7161b 100644 --- a/collects/handin-server/utils.ss +++ b/collects/handin-server/utils.ss @@ -158,9 +158,9 @@ (error what "file access denied (~a)" path))) (lambda (what host port mode) (error what "network access denied")))) - (define (safe-eval expr) + (define (safe-eval expr . more) (parameterize ([current-security-guard tight-security]) - (eval expr))) + (apply eval expr more))) ;; Execution ---------------------------------------- @@ -232,16 +232,17 @@ '((require (lib "errortrace.ss" "errortrace")) (execute-counts-enabled #t)))) (safe-eval body) - (when coverage-enabled - (set! execute-counts - (filter (lambda (x) - (eq? 'program (syntax-source (car x)))) - (safe-eval '(get-execute-counts))))) (when (and (pair? body) (eq? 'module (car body)) (pair? (cdr body)) (symbol? (cadr body))) (let ([mod (cadr body)]) (safe-eval `(require ,mod)) - (current-namespace (module->namespace mod))))) + (current-namespace (module->namespace mod)))) + (when coverage-enabled + (set! execute-counts + (map (lambda (x) (cons (car x) (cdr x))) + (filter (lambda (x) + (eq? 'program (syntax-source (car x)))) + (safe-eval '(get-execute-counts) ns)))))) (channel-put result-ch 'ok)) ;; Now wait for interaction expressions: (let loop ()