The source code of the PHP generating this response from the server is shown below and available for download here.
It contains a working example of how to set the proper headers for the file requested by DEWDClient.groovy. This class is very simple and simply sets a few headers and passes the file content through, so porting this class to other scripting languages would be quite simple.