Upgrading from 3.8 to 3.9: Redirect Problem

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Upgrading from 3.8 to 3.9: Redirect Problem

Dan Kereliuk
We've just tried upgrading to the latest Orbeon 3.9 from version 3.8 and we're finding that any of our submissions that use redirects are now failing. ie. at the end of the XQuery file being executed, we have the following:

return response:redirect-to(xs:anyURI("url_to_redirect_to"))

After this query completes, the entire page just goes blank in the browser, and the address bar doesn't even change. Checking the Orbeon logs, we see:

2011-07-07 11:19:43,424 ERROR ProcessorService  - Exception at line 108, column 65 of oxf:/config/epilogue-servlet.xpl (reading processor output: name='data', id='themed-data') java.net.SocketException: Broken pipe
....

Now this is with a submission using @replace="all" and @method="post". When we switch to @method="get", it works fine. However, our application was built under Orbeon 3.8 and relies heavily on using both HTTP POST and having redirects. So it's not something we can change, yet we still need to upgrade to 3.9 to fix another bug we have been experiencing.

Reply | Threaded
Open this post in threaded view
|

Re: Upgrading from 3.8 to 3.9: Redirect Problem

Alessandro  Vernet
Administrator
Hi Dan,

Does it matter that XQuery is being used on the target page (if XQuery is indeed being used to issue that redirect)? Should I be able to reproduce by doing a submission replace="all" to any page that responds with a redirect?

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Upgrading from 3.8 to 3.9: Redirect Problem

Dan Kereliuk
Alessandro Vernet wrote
Hi Dan,

Does it matter that XQuery is being used on the target page (if XQuery is indeed being used to issue that redirect)? Should I be able to reproduce by doing a submission replace="all" to any page that responds with a redirect?

Alex
Yep, you should be able to reproduce this with any page. I've attached a test case below to demonstrate. Drop the .xq file into the root /db directory of eXist, and place the /test-case folder under Orbeon's /apps.

test-case.zip

Notice how one button redirects properly to google, while the other just gives a blank page. The only difference is that one submits using POST, while the other uses GET. I'm not sure if this is a bug or intended new behavior, but it wasn't this way in 3.8, and it's preventing us from upgrading because we rely on the old behavior. A work-around would be greatly appreciated.

Thanks,
Dan