p:http-request: c:response/c:body/@content-type value

  Hi,

  In p:http-request, when using @override-content-type, should
c:body/@content-type contain the overridden content type, or the
overriding one?  For instance, with the following request:

    <c:request override-content-type="text/plain" .../>

should we get:

    <c:response ...>
       <c:header name="Content-Type" value="application/xml"/>
       ...
       <c:body content-type="text/plain">
          ...
       </c:body>
    </c:response>

or instead:

    <c:response ...>
       <c:header name="Content-Type" value="application/xml"/>
       ...
       <c:body content-type="application/xml">
          ...
       </c:body>
    </c:response>

  Personally, I think the former is more logical, because
c:body/@content-type represent the type used to build the c:body,
the original content type being still available in the headers.
But I can't find a clear response in the CR.

  A related question is: should we use the full Content-Type
header value, or just the media type within it for @content-type?
For instance, should we get:

    <c:header name="Content-Type" value="text/xml; charset=utf-8"/>
    <c:body content-type="text/xml">

or:

    <c:header name="Content-Type" value="text/xml; charset=utf-8"/>
    <c:body content-type="text/xml; charset=utf-8">

in the c:response?

  Regards,

-- 
Florent Georges
http://www.fgeorges.org/

Received on Friday, 6 February 2009 16:15:40 UTC