You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Robert Koberg <ro...@koberg.com> on 2009/02/05 19:47:13 UTC

Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?

On Feb 5, 2009, at 1:36 PM, Dave Pawson wrote:

> 2009/2/5 Caldarale, Charles R <Ch...@unisys.com>:
>>> From: Dave Pawson [mailto:dave.pawson@gmail.com]
>>> Subject: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place
>>> to constrain the mime type?
>>>
>>> I want to 'reject' (if that's the right word) any http get
>>> with mime type != application/xml
>>
>> Do you mean .html and .jsp are not valid?  That might make life  
>> interesting.  It will be difficult to stop clients from accepting  
>> at least text/html in addition to application/xml.
>
> Wrong way round?
>
> Background.
> Currently I generate a template (outline XML) for an atom feed I run.
> This is 'wrong' (IMHO). I have a tiny server visible to the web.
> I want to use REST to 'get' this template (hence restrict it to  
> application/xml)
> so if you|anyone does a GET on this url I want to 'refuse' you  
> content, by
> returning an http 'error'..... code TBD, I'm sure Roy defined one :-)
>
> So unless the GET is for application/xml I want to return nothing.

Doesn't work that way. You basically want to authenticate the user  
(you) not restrict by mime-type, which IO believe you mean the accept  
header, which most browser will include the application/xml

-Rob

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org