> > We are using Cocoon and its EncodeUrlTransformer to do the session ID 
> > encoding:
> >
> > <map:transformer logger="sitemap.transformer.encodeURL" name="encodeURL" 
> > pool-max="${encodeurl-
> transformer.pool-max}" 
> src="org.apache.cocoon.transformation.EncodeURLTransformer">
> >     
> > <include-name>.*/@href=|.*/@action=|frame/@src=|img/@src=|input/@src=</include-name>
> >     
> > <exclude-name>nonexistinghtmlelement/@nonexistingattribute=</exclude-name>
> > </map:transformer>
> 
> Hmm... I haven't used that transformer before. I'll have to take a look.
> Something that seems obvious to me is that you probably want to add
> something like this to the include-name:
> 
> |img/@src
> 
> This will (presumably) instruct the EncodeUrlTransformer to also
> transform <img> src attributes, too.

I did include that (see above) and it works (mostly) like expected.
 
> > As I wrote before this seems to be working fine for most devices.
> > They
> > either use cookies for all requests or all urls are beeing rewritten to
> > include the session ID.
> 
> The devices themselves don't do the URL rewriting: your server-side code
> (or someone else's, in the case of Cocoon) does it for you.

Just to clarify: I know the EncodeUrlTransformer does the encoding for me. The 
problem seems to be that some devices do not send session ID cookies with image 
requests.

> > And this is part of our problem: we cannot recreate the issue
> > locally
> > to debug it. We just see some 404s in the mod_jk logs from time to time.
> 
> Try just disabling cookies on your web browser and then checking the
> pages. You ought to be able to figure out which images are failing by
> just looking at your web server logs, and then searching for those image
> references in your webapp. Browse to those pages with cookies disabled
> and you should see broken images (or maybe not).

We already tried that. If we disable cookies on our web browsers (or the 
devices we tested), all urls (including image links) are beeing rewritten 
correctly by the Cocoon transformer.
 
> You could also write a filter that sends an error when the URL doesn't
> contain a jsessionid, just for this no-cookies test so you can reproduce
> it and test it.

Interesting idea. I could modified the EncodeUrlTransformer to get some more 
debug information. Will try that on Monday.

Greetings,
Timo

Reply via email to