[plt-scheme] send/suspend: when the response relies on the request

From: Dave Herman (dherman at ccs.neu.edu)
Date: Sat Aug 13 05:08:32 EDT 2005

The type of send/suspend is (string -> response) -> request, which means 
that the continuation argument must create a response without seeing the 
request. But sometimes you need to see the request bindings to generate 
the response properly.

A common example is that XHTML is supposed to be generated with the 
Content-type: application/xhtml+xml, but only if the client browser 
sends an HTTP_ACCEPT binding (in the request) that includes that MIME 
type. So you need to be able to view the request bindings in order to 
generate a Content-type header in the response with make-response/full.

Is there any way to do this?

Thanks,
Dave



Posted on the users mailing list.