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.
For most applications, preserving compatibility is as simple as changing:
(require web-server/servlet
web-server/servlet-env)
to
(require web-server/compat/0/servlet
web-server/compat/0/servlet-env)
However, for libraries and more complicated applications, more
detailed changes may be required.
Other incompatibilities introduced without compatibility bindings:
send/formlet requires that the wrapper return an Xexpr
Other incompatibilities introduced with compatibility bindings:
http/response-structs:
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.
http/cookie:
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 a few weeks, 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.