From 93cb8bab4d34ba20cb1a94267876db4722d399f7 Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Wed, 5 Nov 2008 22:48:46 +0000 Subject: [PATCH] TODOs and contracts svn: r12321 --- collects/web-server/private/mod-map.ss | 12 ++++-------- collects/web-server/private/request.ss | 1 - collects/web-server/scribblings/private.scrbl | 9 ++++----- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/collects/web-server/private/mod-map.ss b/collects/web-server/private/mod-map.ss index cebe4e80db..ea4576834d 100644 --- a/collects/web-server/private/mod-map.ss +++ b/collects/web-server/private/mod-map.ss @@ -1,11 +1,7 @@ -#lang scheme/base -(require mzlib/list - mzlib/plt-match) -; XXX Contract? -(provide compress-serial - decompress-serial) - -; XXX even though we allow all values to be serialized, we only protect against source modification of the servlet program. +#lang scheme +(provide/contract + [compress-serial (list? . -> . list?)] + [decompress-serial (list? . -> . list?)]) ;; compress-mod-map : (listof (cons mod-spec symbol)) -> (listof (cons (or mod-spec number) symbol)) (define (compress-mod-map mm) diff --git a/collects/web-server/private/request.ss b/collects/web-server/private/request.ss index b14fc67719..02fa727449 100644 --- a/collects/web-server/private/request.ss +++ b/collects/web-server/private/request.ss @@ -33,7 +33,6 @@ (match (headers-assq* #"Content-Length" headers) [(struct header (f v)) ; Give it one second per byte (with 5 second minimum... a bit arbitrary) - ; XXX Can this be abstracted? (adjust-connection-timeout! conn (max 5 (string->number (bytes->string/utf-8 v))))] [#f (void)])) diff --git a/collects/web-server/scribblings/private.scrbl b/collects/web-server/scribblings/private.scrbl index 08f848d2c8..ba67d95a60 100644 --- a/collects/web-server/scribblings/private.scrbl +++ b/collects/web-server/scribblings/private.scrbl @@ -294,7 +294,6 @@ files. function from paths to their MIME type. } -@; XXX Rename mod-map.ss @; ------------------------------------------------------------ @section[#:tag "mod-map.ss"]{Serialization Utilities} @(require (for-label web-server/private/mod-map)) @@ -305,14 +304,14 @@ The @schememodname[scheme/serialize] library provides the functionality of serializing values. @filepath{private/mod-map.ss} compresses the serialized representation. -@defproc[(compress-serial [sv serialized-value?]) - compressed-serialized-value?]{ +@defproc[(compress-serial [sv list?]) + list?]{ Collapses multiple occurrences of the same module in the module map of the serialized representation, @scheme[sv]. } -@defproc[(decompress-serial [csv compressed-serialized-value?]) - serialized-value?]{ +@defproc[(decompress-serial [csv list?]) + list?]{ Expands multiple occurrences of the same module in the module map of the compressed serialized representation, @scheme[csv]. }