avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen McConnell <mcconn...@apache.org>
Subject [repository] mime type addition?
Date Wed, 12 Nov 2003 13:21:21 GMT

Have started some experimentation with content negotiation
and I think I need a mime type addition to server running
www.apache.org.

I have setup the following test content:

  http://www.apache.org/~mcconnell/

This contains a single jar file and a test file containing
metadata about the jar file.

  example.jar
  example.jar.meta

I've also put together a little test case that creates a url
to the artifact http://www.apache.org/~mcconnell/example
and then sets the "accept" request parameter to "text/x-meta".
Presumably the mime type used here ("text/x-meta") needs to be
declared on the Apache server with a mapping to the ".meta"
extension. 

Does anyone know if this is something I can configure
in the enclosing directory - or do I need post a request to
infrastructure?

Here is a fragment of the relevant java source:

   URL url = new URL( "http://www.apache.org/~mcconnell/test/example" );
   URLConnection connection = url.openConnection();
   connection.setRequestProperty( "accept", "text/x-meta" );
   getLogger().info( "input" );
   InputStream input = (InputStream) connection.getContent();
   Properties properties = new Properties();
   properties.load( input );

Without the mime mapping the above code will result in the stuffing
of the jar file into the properties file which is not exactly
what we want.

Cheers, Steve.

-- 

Stephen J. McConnell
mailto:mcconnell@apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Mime
View raw message