> From: Andreas Vallen [mailto:[EMAIL PROTECTED]]
> 
> Hello,
> 
> thanks Jens, that answer was exactly what I was looking for.
> 
> Now if Vadim finds some interest in the problem . . .  ;-)
> 
> I'll investigate further wether a simple change in URLSource is
possible. I
> too think the other solution with its two request is suboptimal.

AFAIU, it will require changes in several core classes.

 
> But given that I'm not well aquaintained with the cocoon architecture
I might
> as well go for the quick solution.

This suboptimal action solution is the easiest/fastest I can think of
right now. The best would be of course if you can derive type of the
content from the URI space somehow.


Vadim

 
> I'll let you know of any results.
> 
> BTW: I hope my reposting of our messages was ok?!
> 
> Cheers,
> Andreas
> 
> > Now I got your point ... Of course this doesn't work for dynamic
> > web pages without extensions.
> >
> > This way it gets a bit more complicated ... You need to get the
> > ContentType header and feed it somehow into the pipeline.
> >
> > Well, it's not the best way, but a possible one:
> >
> > Write an Action which uses the URL to send a HEAD-Request to the
> > HTTP-Server, get the Content-Type header and put it into the
> > (Cocoon) Request. Then use a RequestMatcher.
> >
> > Or return the value within a HashMap from the Action and use
> > substitution with {}.
> >
> > I think modifying URLSource to store the content-type somewhere
> > will only lead into lots of trouble (not having the objectModel,
> > threading issues, etc.)
> >
> > The first way of course will send two Requests (one GET, one HEAD)
> > two the WebServer of the source, which is not desirable as well.
> >
> >
> > Looking at the source code of Source and AbstractStreamSource I can
> > also think of no other way of achieving this without breaking
> > design patterns of Cocoon. Maybe Vadim got a better idea ?
> >
> > > Greetings,
> > > Andreas
> >
> > Regards,
> >
> >
> > Jens
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to