…
|
||
---|---|---|
.. | ||
dispatch | ||
dispatchers | ||
http | ||
servlet | ||
README | ||
servlet-dispatch.rkt | ||
servlet-env.rkt |
In Racket 5.0.99.4 and before, the Web Server supported implicit conversion of X-expressions and lists with the format (cons/c bytes? (listof (or/c string? bytes?))) into response data structures for output. The compatibility binding for normalize-response is a coercion from the OLD responses to the NEW response structure. Other incompatibilities introduced: The contract on read-mime-types specifies what kind of hash it returns. send/formlet requires that the wrapper return an Xexpr response/basic was removed. response/full was removed. response/port was removed [1] The response/incremental structure was removed. response/c was removed. make-xexpr-response was renamed response/xexpr and extended. normalize-response was removed. xexpr-response/cookies was removed and folded into response/xexpr. The following places are where old responses were accepted and no longer are: configuration-table responders authentication responder on dispatchers/dispatch-passwords servlet-loading responder on dispatchers/dispatch-servlets #lang web-server/insta [2] lang/web --- make-stateless-servlet private/servlet --- handler field servlet-env --- serve/servlet's #:file-not-found-responder arg serlet/servlet-structs --- response-generator/c, expiration-handler/c servlet/setup --- make*servlet servlet/web --- with-errors-to-browser The following places are where old responses were accepted and no longer are, but compatible bindings are provided: dispatch/serve --- serve/dispatch dispatchers/dispatch-lift --- make dispatchers/dispatch-pathprocedure --- make http/response --- output-response and output-response/method servlet-dispatch --- dispatch/servlet servlet-env --- serve/servlet servlet/web --- send/* Here are some ideas that could be use to ease backwards compatibility: * A new servlet version for module servlets that puts an old contract on the return from start. Footnotes: 1. response/port was present for about a week, so no compatibility is provided. 2. If anyone can suggest a good way to provide a compatibility layer without duplicating code, I'm interested. The problem is that web-server/insta walks the module source to find the "start" function, and we'd presumably want to overwrite that. Plus, web-server/insta will import other bindings that now have imcompatibilities.