From f106614a75f1641e490dc6bfb421c4531d61a80c Mon Sep 17 00:00:00 2001 From: interp Date: Fri, 1 Aug 2003 17:33:21 +0000 Subject: [PATCH] `cat ~/diff-sunet/3/log` --- scheme/httpd/surflets/surflet-handler.scm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scheme/httpd/surflets/surflet-handler.scm b/scheme/httpd/surflets/surflet-handler.scm index 1192c73..d012aa5 100644 --- a/scheme/httpd/surflets/surflet-handler.scm +++ b/scheme/httpd/surflets/surflet-handler.scm @@ -91,7 +91,7 @@ ;; Catch conditions from get-surflet-rt-structure. (lambda (condition decline) (delete-session! session-id) - (bad-gateway-error-response s-req path-string condition)) + (bad-surflet-error-response s-req path-string condition)) (let ((surflet (get-surflet-rt-structure path-string surflet-path))) (timeout-queue-register-session! session-id (+ (time) lifetime)) @@ -102,7 +102,7 @@ (delete-session! session-id) ;; Restore correct continuation with shift. (shift unused - (bad-gateway-error-response s-req path-string condition))) + (bad-surflet-error-response s-req path-string condition))) (with-cwd surflet-path (with-names-from-rt-structure surflet surflet-interface @@ -267,13 +267,13 @@ (else ;; We lose. (display "Error in SUrflet output.\n" out)) )))) - (make-error-response (status-code bad-gateway) #f + (make-error-response (status-code internal-error) #f "The SUrflet returned an invalid response object (no surflet-response).")))) ((and (response? response) ;; RESPONSE? refers to a HTTP-RESPONSE. (redirect-body? (response-body response))) response) (else - (make-error-response (status-code bad-gateway) #f + (make-error-response (status-code internal-error) #f "The SUrflet returned an invalid response object (no surflet-response).")))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -542,9 +542,9 @@ ;; URLs (= resume URLs). Resume URLs look like ;; http://localhost:8088/surflet/admin-handler.scm;k757033335;c1-684902143?return54= (define *resume-url-regexp* (rx (submatch (* (- printing ";"))) - ";k" (submatch (+ digit)) ; Instance-ID + ";k" (submatch (* digit)) ; Instance-ID ";c" (+ digit) ; Continuation Counter - "-" (submatch (+ digit)))) ; Continuation-ID + "-" (submatch (* digit)))) ; Continuation-ID ;; All arguments are numbers except PATH-STRING, which is a string. (define (make-resume-url path-string session-id continuation-counter continuation-id) @@ -576,14 +576,14 @@ (let ((match (regexp-search *resume-url-regexp* resume-url))) (if match (match:substring match 1) - #f))) + (values #f #f)))) (define (resume-url? resume-url) (regexp-search? *resume-url-regexp* resume-url)) -(define (bad-gateway-error-response s-req path-string condition) +(define (bad-surflet-error-response s-req path-string condition) (make-error-response - (status-code bad-gateway) + (status-code internal-error) (surflet-request-request s-req) (format #f "Error in SUrflet ~s." path-string) condition))