Grzegorz Kossakowski wrote:
Given that mime type (and other http header informations) are calculated during setup phase of service's pipeline setup phase it's guaranteed that this information can be properly determined without providing any content (in service call, it's POSTed one). Thus, it's enough to perform HTTP HEAD request that does not post any data and does not expect any data returned by the service.
It means that serializer will need to perform two requests:
1. HTTP HEAD which is meant only to collect all data required to set all http headers correctly (including Content-Type) 2. Actual HTTP POST that POSTs the data and gets transformed data returned by the service

The obvious drawback of this method is that we need to perform two requests. However, first one should be really cheap because pipeline needs only to setup components to gather all required meta information, no processing will be performed.

IIUC, generally this will not work. Suppose that you are calling this simple sitemap:

  <map:generate src="file.xml"/>
  <map:act type="authenticate">
    <map:act type="delete">
      <map:transform src="file.xsl"/>
      <map:serialize mime-type="foo/bar"/>
    </map:act>
    <map:serialize status-code="404"/>
  </map:act>
  <map:serialize status-code="401"/>

Building this pipeline twice will invoke delete action twice - and this would give two different results.

Vadim

Reply via email to