TODOs and contracts
svn: r12321
This commit is contained in:
parent
326540df07
commit
93cb8bab4d
|
@ -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)
|
||||
|
|
|
@ -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)]))
|
||||
|
|
|
@ -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].
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user