caucho
 


The additions are in com.caucho.server.http.Response and com.caucho.server.http.Request. This will only work with bin/httpd.sh (or bin/httpd.exe on windows) and no filters. The other configurations are not supported. Here's how it would work in a servlet:

import com.caucho.server.http.*;
import com.caucho.vfs.*;

public void service(HttpServletRequest request, 
                    HttpServlerResponse response)
  throws IOException, ServletException
{
  Request req = (Request) request;
  Response res = (Response) response;

  // change to raw mode.  Resin will return a 101 response:
  // HTTP/1.0 101 Switching Protocols

  // Server: Resin/2.0

  // Content-Type: text/html

  // Content-Length: 0

  // Date: Fri, 08 May 1998 09:51:31 GMT


  //
  // the raw data will appear immediately after the blank line
  res.switchToRaw();

  // you can use OutputStream instead of WriteStream.  It's
  // automatically buffered
  WriteStream os = res.getRawOutput();
  // you can use InputStream instead of ReadStream.
  ReadStream is = req.getRawInput();

  // following code will use is and os as raw streams.
}


Copyright © 1998-2002 Caucho Technology, Inc. All rights reserved.
Resin® is a registered trademark, and HardCoretm and Quercustm are trademarks of Caucho Technology, Inc.