Fix to AJAX redirect processing

2 views
Skip to first unread message

Alexander Obuhovich

unread,
Nov 13, 2010, 6:02:31 AM11/13/10
to In-Portal Bugs
When inside AJAX request, then In-Portal don't perform regular redirect via "Location:" header, since it could break whole ajax request.

Instead of that ajax responce in form "#redirect#new_url_here" is returned. In case, when debug mode is enabled, then responce becomes "#redirect#new_url_here some_debugger_report_part_ here". This prevents proper redirect url to be parsed.

I propose to replace "^#redirect#(.*)" regular expression to "^#redirect#(.*?)($|\s)" and this way problem will be solved.

--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com

Alexander Obuhovich

unread,
Nov 13, 2010, 6:21:47 AM11/13/10
to In-Portal Bugs
This one works: "^#redirect#(.*?)($|\\s.*)" (\s was replaced by \\s).

Dmitry A.

unread,
Nov 13, 2010, 12:46:17 PM11/13/10
to In-Portal Bugs Team
Hi Alex,


Thanks for catching this one. Would you please create a patch and task
since already included proposed solution.

I would same we put this into 5.1.1 release since it's quite important
and no need to wait for 5.1.2


DA


On Nov 13, 5:21 am, Alexander Obuhovich <aik.b...@gmail.com> wrote:
> This one works: "*^#redirect#(.*?)($|\\s.*)*" (\s was replaced by \\s).
>
> On Sat, Nov 13, 2010 at 1:02 PM, Alexander Obuhovich <aik.b...@gmail.com>wrote:
>
>
>
>
>
>
>
>
>
> > When inside AJAX request, then In-Portal don't perform regular redirect via
> > "Location:" header, since it could break whole ajax request.
>
> > Instead of that ajax responce in form "#redirect#new_url_here" is returned.
> > In case, when debug mode is enabled, then responce becomes
> > "#redirect#new_url_here some_debugger_report_part_ here". This prevents
> > proper redirect url to be parsed.
>
> > I propose to replace "*^#redirect#(.*)*" regular expression to "*
> > ^#redirect#(.*?)($|\s)*" and this way problem will be solved.

Alexander Obuhovich

unread,
Nov 13, 2010, 1:48:31 PM11/13/10
to in-port...@googlegroups.com
Task: http://tracker.in-portal.org/view.php?id=922

Will put into 5.1.2, since it only happens in debug mode.


--
You received this message because you are subscribed to the Google Groups "In-Portal Bugs Team" group.
To post to this group, send email to in-port...@googlegroups.com.
To unsubscribe from this group, send email to in-portal-bug...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/in-portal-bugs?hl=en.

Dmitry Andrejev

unread,
Nov 13, 2010, 3:03:00 PM11/13/10
to in-port...@googlegroups.com
Agreed!
Best regards,

Dmitry A.

Reply all
Reply to author
Forward
0 new messages