Default to empty-string to avoid crash when header entirely absent

This commit is contained in:
Tony Garnock-Jones 2017-03-25 15:19:13 -04:00
parent c15b75ecae
commit 425a5abac3
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@
(dict-ref (web-request-header-headers req) 'content-type #f))
(define (web-request-header-websocket-upgrade? req)
(equal? (string-downcase (dict-ref (web-request-header-headers req) 'upgrade #f)) "websocket"))
(equal? (string-downcase (dict-ref (web-request-header-headers req) 'upgrade "")) "websocket"))
(begin-for-declarations
(define-struct-defaults make-web-response-header web-response-header