Author: cziegeler
Date: Sun Mar 6 05:09:30 2005
New Revision: 156309
URL: http://svn.apache.org/viewcvs?view=rev&rev=156309
Log:
Use inherited method to set mime-type
Modified:
cocoon/trunk/src/blocks/profiler/java/org/apache/cocoon/components/profiler/ProfilingCachingProcessingPipeline.java
cocoon/trunk/src/blocks/profiler/java/org/apache/cocoon/components/profiler/ProfilingNonCachingProcessingPipeline.java
Modified:
cocoon/trunk/src/blocks/profiler/java/org/apache/cocoon/components/profiler/ProfilingCachingProcessingPipeline.java
URL:
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/profiler/java/org/apache/cocoon/components/profiler/ProfilingCachingProcessingPipeline.java?view=diff&r1=156308&r2=156309
==============================================================================
---
cocoon/trunk/src/blocks/profiler/java/org/apache/cocoon/components/profiler/ProfilingCachingProcessingPipeline.java
(original)
+++
cocoon/trunk/src/blocks/profiler/java/org/apache/cocoon/components/profiler/ProfilingCachingProcessingPipeline.java
Sun Mar 6 05:09:30 2005
@@ -206,23 +206,7 @@
}
this.data.setSetupTime(index++, System.currentTimeMillis()-time);
- // Set the mime-type
- // the behaviour has changed from 2.1.x to 2.2 according to bug
#10277
- if (serializerMimeType != null) {
- // there was a serializer defined in the sitemap
- environment.setContentType(serializerMimeType);
- } else {
- // ask to the component itself
- String mimeType = this.serializer.getMimeType();
- if (mimeType != null) {
- environment.setContentType (mimeType);
- } else {
- // No mimeType available
- String message = "Unable to determine MIME type for " +
- environment.getURIPrefix() + "/" +
environment.getURI();
- throw new ProcessingException(message);
- }
- }
+ this.setMimeTypeForSerializer(environment);
} catch (SAXException e) {
throw new ProcessingException("Could not setup pipeline.", e);
} catch (IOException e) {
Modified:
cocoon/trunk/src/blocks/profiler/java/org/apache/cocoon/components/profiler/ProfilingNonCachingProcessingPipeline.java
URL:
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/profiler/java/org/apache/cocoon/components/profiler/ProfilingNonCachingProcessingPipeline.java?view=diff&r1=156308&r2=156309
==============================================================================
---
cocoon/trunk/src/blocks/profiler/java/org/apache/cocoon/components/profiler/ProfilingNonCachingProcessingPipeline.java
(original)
+++
cocoon/trunk/src/blocks/profiler/java/org/apache/cocoon/components/profiler/ProfilingNonCachingProcessingPipeline.java
Sun Mar 6 05:09:30 2005
@@ -210,23 +210,7 @@
}
this.data.setSetupTime(index++, System.currentTimeMillis()-time);
- // Set the mime-type
- // the behaviour has changed from 2.1.x to 2.2 according to bug
#10277
- if (serializerMimeType != null) {
- // there was a serializer defined in the sitemap
- environment.setContentType(serializerMimeType);
- } else {
- // ask to the component itself
- String mimeType = this.serializer.getMimeType();
- if (mimeType != null) {
- environment.setContentType (mimeType);
- } else {
- // No mimeType available
- String message = "Unable to determine MIME type for " +
- environment.getURIPrefix() + "/" +
environment.getURI();
- throw new ProcessingException(message);
- }
- }
+ this.setMimeTypeForSerializer(environment);
} catch (SAXException e) {
throw new ProcessingException("Could not setup pipeline.", e);
} catch (IOException e) {