Menu

#7 "url:" rewriting please

open
nobody
None
5
2013-02-22
2013-02-22
sim
No

Hudson logins don't work via j2ep because the rewriter does not rewrite the ajax post in its javascript. In the following example we see that it has successfully rewitten the success href but the url of the POST has been missed. Here it should have been rewritten to "/j2ep/hudson2/j_acegi_security_check".

function submitForm(){
jQuery('#loginMsg').css({ opacity: 1.0 });
jQuery('#loginError').css({ opacity: 0.0 });
var dataString = jQuery("#loginForm").serialize();
jQuery.ajax({
type: 'POST',
url: "/hudson/j_acegi_security_check",
data: dataString,
success: function(){
window.location.href="/j2ep/hudson2/login";
},
error: function(){
jQuery('#loginError').css({ opacity: 1.0 });
jQuery('#loginMsg').css({ opacity: 0.0 });
},
dataType: "html"
});
}

Discussion

  • Neil Winton

    Neil Winton - 2013-02-25

    This feature has been added in the attached version of UrlRewritingOutputStream and UrlRewritingResponseWrapper (as well as fixing a couple of bugs).

     
  • Neil Winton

    Neil Winton - 2013-02-25

    See 3605916 for the file attachments mentioned here.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.