HTTPResource Questions

Kyle Jamieson writes:
 > Hello,
 > 
 > Is anyone familiar enough with the HTTPResource to say how I could extract
 > metadata from a standard HTTP PUT request in the put method of the
 > HTTPResource?  I want to feed Jigsaw this:
 > 
 > PUT /Labels HTTP/1.0
 > Content-Type: application/pics-label
 > Content-Length: 123
 > 
 > (PICS-1.1 ...)
 > 
 > And be able to extract the values of Content-Type and Content-Length in the
 > put method of HTTPResource.  I have tried using getHeaderValue of one of
 > the superclasses of HTTPResource, but this is not reliable when more than
 > one attribute is listed.  Any ideas?

Redefine the HTTPResource PUT method, and then query the request that
you get when invoked (check the FileResource), eg:

public Reply put(Request request) {

   request.getContentLength();
   request.getContentType();
}


Anselm

Received on Friday, 25 July 1997 04:33:19 UTC