cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <va...@reverycodes.com>
Subject Re: svn commit: r562199 - in /cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl: pom.xml src/changes/changes.xml src/main/java/org/apache/cocoon/components/treeprocessor/sitemap/SerializeNode.java
Date Sun, 05 Aug 2007 02:56:55 GMT
Grzegorz Kossakowski wrote:
> vgritsenko@apache.org pisze:
>> URL: http://svn.apache.org/viewvc?view=rev&rev=562199
>> Log:
>> Fix regression introduced in r530406, r532869.
>> Update changes document: RC1 is long released.
> 
> At this point I'm not sure how, but your commit breakes servletService 
> components (generator, transformer and serializer) usage.

The problem is - was - two fold. First, BlockCallHttpServletResponse did not had 
a default status code. So when block call is complete and chosen servlet did not 
set any status code - which it can do - BlockCallHttpServletResponse was 
returning 0 instead of 200. Revision r562802 fixes this.

Second problem is in ServletSource - it was tripping over 0 status code returned 
by BlockCallHttpServletResponse. It assumes that if status is not 200, it should 
be 304 - how naive :)

   if (servletConnection.getResponseCode() != HttpServletResponse.SC_OK) {
     //most probably, servlet returned 304 (not modified) and we need to perform 
second request to get data

Oh, and there is a third problem - I added a FIXME in revision r562800 - it 
looses original request body once it decides it was a redirect. Actually I don't 
think we can allow it to perform POST second time at all. Just imagine it was 
somebody's credit card to be charged $999 - it won't be good at all [1] :)

Vadim


[1] Yes in such cases operation should be idempotent - in perfect world, that is...

Mime
View raw message