[racket-dev] Removing Xexpr preference from Web Server

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Fri Nov 26 19:55:49 EST 2010

I would like to remove the implicit preference the Web Server gives to
Xexprs and the old esoteric bytes response format. This is backwards
incompatible change, but I think it will make the server better in the
long run as it will promote other HTML encodings, like the xml and
html modules, Eli's new system, SXML, etc. I am interested in your
opinion.

-- Details --

Everywhere that the server expects a "response" uses the response/c contract

http://pre.racket-lang.org/docs/html/web-server/http.html#(def._((lib._web-server/http/response-structs..rkt)._response/c))

This allows the native HTTP response data structures, Xexprs, and
lists that start with bytes (the MIME type) where everything after is
a byte string or normal string. [I have no idea where that last thing
came from, but it was in the legacy server and I've kept it
compatible.]

In addition to backwards incompatibility, this could make Web
programming a bit more verbose, because you'd have to explicitly call
"make-xexpr-response" to construct the response from the Xexpr. I
could ease that a little bit by changing its name to "xexpr" or
something similar.

Any ideas on the best way to deal with this?

Jay

-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93


Posted on the dev mailing list.