Re: Skip URL escape on redirect
Hi Martin, It works fine if using this status code. Thank you for your help. Calin Pavel On 3/6/2019 5:47 PM, Martin Grigorov wrote: Hi, Use RedirectToUrlException(yourUrl, HttpServletResponse.SC_SEE_OTHER) See https://markmail.org/message/bis57nb2yecdgzqx for more details. It has been discussed last week. On Wed, Mar 6, 2019 at 5:02 PM Calin Pavel wrote: Hello, I'm doing a redirect from Wicket code like* throw new RedirectToUrlException(" http://mydomain/file(1).txt?Signature=JdfsuerJQEWQA2"); *and this should redirect user to this page which is accessible if signature is valid (checks if URL did not changed). But, when doing the redirect Wicket escapes the brackets - so browser received in header location=*http://mydomain/file%281%29.txt?Signature=JdfsuerJQEWQA2 *, but the server does not accepts the request because signature does not match this URL. For this: 1. is there any other way to do the redirect without escaping URL? 2. is it a browser problem - it should unescape URL before doing redirect? have some doubts, since all (Chrome, IE, Firefox) works the same 3. would it be the responsibility of the targeted server to decode / unescape URL and then check for the signature? Thank you, Calin Pavel * * - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Skip URL escape on redirect
Hi, Use RedirectToUrlException(yourUrl, HttpServletResponse.SC_SEE_OTHER) See https://markmail.org/message/bis57nb2yecdgzqx for more details. It has been discussed last week. On Wed, Mar 6, 2019 at 5:02 PM Calin Pavel wrote: > Hello, > > I'm doing a redirect from Wicket code like* throw new > RedirectToUrlException(" > http://mydomain/file(1).txt?Signature=JdfsuerJQEWQA2"); > *and this should redirect user to this page which is accessible if > signature is valid (checks if URL did not changed). > > But, when doing the redirect Wicket escapes the brackets - so browser > received in header > location=*http://mydomain/file%281%29.txt?Signature=JdfsuerJQEWQA2 *, > but the server does not accepts the request because signature does not > match this URL. > > For this: > 1. is there any other way to do the redirect without escaping URL? > > 2. is it a browser problem - it should unescape URL before doing > redirect? have some doubts, since all (Chrome, IE, Firefox) works the same > 3. would it be the responsibility of the targeted server to decode / > unescape URL and then check for the signature? > > Thank you, > Calin Pavel > * > * >
Re: Skip URL escape on redirect
IMO better way would be to create hash for encoded URL On Wed, 6 Mar 2019 at 22:02, Calin Pavel wrote: > > Hello, > > I'm doing a redirect from Wicket code like* throw new > RedirectToUrlException("http://mydomain/file(1).txt?Signature=JdfsuerJQEWQA2"); > *and this should redirect user to this page which is accessible if > signature is valid (checks if URL did not changed). > > But, when doing the redirect Wicket escapes the brackets - so browser > received in header > location=*http://mydomain/file%281%29.txt?Signature=JdfsuerJQEWQA2 *, > but the server does not accepts the request because signature does not > match this URL. > > For this: > 1. is there any other way to do the redirect without escaping URL? > > 2. is it a browser problem - it should unescape URL before doing > redirect? have some doubts, since all (Chrome, IE, Firefox) works the same > 3. would it be the responsibility of the targeted server to decode / > unescape URL and then check for the signature? > > Thank you, > Calin Pavel > * > * -- WBR Maxim aka solomax - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Skip URL escape on redirect
Hello, I'm doing a redirect from Wicket code like* throw new RedirectToUrlException("http://mydomain/file(1).txt?Signature=JdfsuerJQEWQA2"); *and this should redirect user to this page which is accessible if signature is valid (checks if URL did not changed). But, when doing the redirect Wicket escapes the brackets - so browser received in header location=*http://mydomain/file%281%29.txt?Signature=JdfsuerJQEWQA2 *, but the server does not accepts the request because signature does not match this URL. For this: 1. is there any other way to do the redirect without escaping URL? 2. is it a browser problem - it should unescape URL before doing redirect? have some doubts, since all (Chrome, IE, Firefox) works the same 3. would it be the responsibility of the targeted server to decode / unescape URL and then check for the signature? Thank you, Calin Pavel * *