[RFE] WebRequestCodingStrategy.decode

View: New views
11 Messages — Rating Filter:   Alert me  

[RFE] WebRequestCodingStrategy.decode

by Alexandru Objelean :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I know it may sound strange, but I have this request in my
application:  if user tweaks an url ending with "wicket:interface =
:0::::" & add some kind of characters at the end, like "? or !", the
page must be redirected to 404 instead of InternalError page. I know
that I can catch WicketRuntimeException & redirect always to 404, but
this would hide other potential problems because
WicketRuntimeException can be caused by other types of problems.

My suggestion is to throw a more specific RuntimeException in the
WebRequestCodingStrategy.decode method, like DecodeRequestException
(subclass of WicketRuntimeException). This way, I can treat only this
kind of problems differently.

What is you oppinion?  Should I create a JIRA issue for that?

Thank you!
Alex Objelean

Re: [RFE] WebRequestCodingStrategy.decode

by jthomerson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sounds feasible to me.  Definitely add a JIRA so that it gets tracked.
 A patch will get it committed even sooner.

--
Jeremy Thomerson
http://www.wickettraining.com




On Wed, Jun 3, 2009 at 12:12 AM, Objelean Alex <alex.objelean@...> wrote:

> I know it may sound strange, but I have this request in my
> application:  if user tweaks an url ending with "wicket:interface =
> :0::::" & add some kind of characters at the end, like "? or !", the
> page must be redirected to 404 instead of InternalError page. I know
> that I can catch WicketRuntimeException & redirect always to 404, but
> this would hide other potential problems because
> WicketRuntimeException can be caused by other types of problems.
>
> My suggestion is to throw a more specific RuntimeException in the
> WebRequestCodingStrategy.decode method, like DecodeRequestException
> (subclass of WicketRuntimeException). This way, I can treat only this
> kind of problems differently.
>
> What is you oppinion?  Should I create a JIRA issue for that?
>
> Thank you!
> Alex Objelean
>

Re: [RFE] WebRequestCodingStrategy.decode

by Alexandru Objelean :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Could it be fixed in wicket-1.4-rc5 release?

Thanks!
Alex Objelean

Jeremy Thomerson-5 wrote:
Sounds feasible to me.  Definitely add a JIRA so that it gets tracked.
 A patch will get it committed even sooner.

--
Jeremy Thomerson
http://www.wickettraining.com




On Wed, Jun 3, 2009 at 12:12 AM, Objelean Alex <alex.objelean@gmail.com> wrote:
> I know it may sound strange, but I have this request in my
> application:  if user tweaks an url ending with "wicket:interface =
> :0::::" & add some kind of characters at the end, like "? or !", the
> page must be redirected to 404 instead of InternalError page. I know
> that I can catch WicketRuntimeException & redirect always to 404, but
> this would hide other potential problems because
> WicketRuntimeException can be caused by other types of problems.
>
> My suggestion is to throw a more specific RuntimeException in the
> WebRequestCodingStrategy.decode method, like DecodeRequestException
> (subclass of WicketRuntimeException). This way, I can treat only this
> kind of problems differently.
>
> What is you oppinion?  Should I create a JIRA issue for that?
>
> Thank you!
> Alex Objelean
>

Re: [RFE] WebRequestCodingStrategy.decode

by igor.vaynberg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

we should not fix this in 1.4, and there is already a jira for this in
1.5. we should not fix it in 1.4 because there are existing production
sites that may depend on the current behavior and we should try not to
break them. the problem with this version is that due to various
reasons it got dragged out for quiet a while and there were production
sites running even on milestones because they were pretty stable. i
think we should just finish 1.4 and move on to 1.5 where we can fix
all these things.

in the meanwhile users can always subclass the strategies, catch the
exceptions, and redirect to 404 if this is a big problem.

-igor

On Tue, Jun 2, 2009 at 10:25 PM, Alex Objelean <alex_objelean@...> wrote:

>
> Could it be fixed in wicket-1.4-rc5 release?
>
> Thanks!
> Alex Objelean
>
>
> Jeremy Thomerson-5 wrote:
>>
>> Sounds feasible to me.  Definitely add a JIRA so that it gets tracked.
>>  A patch will get it committed even sooner.
>>
>> --
>> Jeremy Thomerson
>> http://www.wickettraining.com
>>
>>
>>
>>
>> On Wed, Jun 3, 2009 at 12:12 AM, Objelean Alex <alex.objelean@...>
>> wrote:
>>> I know it may sound strange, but I have this request in my
>>> application:  if user tweaks an url ending with "wicket:interface =
>>> :0::::" & add some kind of characters at the end, like "? or !", the
>>> page must be redirected to 404 instead of InternalError page. I know
>>> that I can catch WicketRuntimeException & redirect always to 404, but
>>> this would hide other potential problems because
>>> WicketRuntimeException can be caused by other types of problems.
>>>
>>> My suggestion is to throw a more specific RuntimeException in the
>>> WebRequestCodingStrategy.decode method, like DecodeRequestException
>>> (subclass of WicketRuntimeException). This way, I can treat only this
>>> kind of problems differently.
>>>
>>> What is you oppinion?  Should I create a JIRA issue for that?
>>>
>>> Thank you!
>>> Alex Objelean
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/-RFE--WebRequestCodingStrategy.decode-tp23845496p23845588.html
> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>
>

Re: [RFE] WebRequestCodingStrategy.decode

by Alexandru Objelean :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

JIRA issue created: https://issues.apache.org/jira/browse/WICKET-2307

Thank you!
Alex Objelean

Jeremy Thomerson-5 wrote:
Sounds feasible to me.  Definitely add a JIRA so that it gets tracked.
 A patch will get it committed even sooner.

--
Jeremy Thomerson
http://www.wickettraining.com




On Wed, Jun 3, 2009 at 12:12 AM, Objelean Alex <alex.objelean@gmail.com> wrote:
> I know it may sound strange, but I have this request in my
> application:  if user tweaks an url ending with "wicket:interface =
> :0::::" & add some kind of characters at the end, like "? or !", the
> page must be redirected to 404 instead of InternalError page. I know
> that I can catch WicketRuntimeException & redirect always to 404, but
> this would hide other potential problems because
> WicketRuntimeException can be caused by other types of problems.
>
> My suggestion is to throw a more specific RuntimeException in the
> WebRequestCodingStrategy.decode method, like DecodeRequestException
> (subclass of WicketRuntimeException). This way, I can treat only this
> kind of problems differently.
>
> What is you oppinion?  Should I create a JIRA issue for that?
>
> Thank you!
> Alex Objelean
>

Re: [RFE] WebRequestCodingStrategy.decode

by Alexandru Objelean :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Igor,
I can't see how this fix would break anything as long as DecodeRuntimeException is still a WicketRuntimeException.

Your suggestion, to override the WebRequestCodingStrategy isn't an option, just because WebRequestCodingStrategy#decode(Request) method is final.

Thank you!
Alex Objelean
 

igor.vaynberg wrote:
we should not fix this in 1.4, and there is already a jira for this in
1.5. we should not fix it in 1.4 because there are existing production
sites that may depend on the current behavior and we should try not to
break them. the problem with this version is that due to various
reasons it got dragged out for quiet a while and there were production
sites running even on milestones because they were pretty stable. i
think we should just finish 1.4 and move on to 1.5 where we can fix
all these things.

in the meanwhile users can always subclass the strategies, catch the
exceptions, and redirect to 404 if this is a big problem.

-igor

On Tue, Jun 2, 2009 at 10:25 PM, Alex Objelean <alex_objelean@yahoo.com> wrote:
>
> Could it be fixed in wicket-1.4-rc5 release?
>
> Thanks!
> Alex Objelean
>
>
> Jeremy Thomerson-5 wrote:
>>
>> Sounds feasible to me.  Definitely add a JIRA so that it gets tracked.
>>  A patch will get it committed even sooner.
>>
>> --
>> Jeremy Thomerson
>> http://www.wickettraining.com
>>
>>
>>
>>
>> On Wed, Jun 3, 2009 at 12:12 AM, Objelean Alex <alex.objelean@gmail.com>
>> wrote:
>>> I know it may sound strange, but I have this request in my
>>> application:  if user tweaks an url ending with "wicket:interface =
>>> :0::::" & add some kind of characters at the end, like "? or !", the
>>> page must be redirected to 404 instead of InternalError page. I know
>>> that I can catch WicketRuntimeException & redirect always to 404, but
>>> this would hide other potential problems because
>>> WicketRuntimeException can be caused by other types of problems.
>>>
>>> My suggestion is to throw a more specific RuntimeException in the
>>> WebRequestCodingStrategy.decode method, like DecodeRequestException
>>> (subclass of WicketRuntimeException). This way, I can treat only this
>>> kind of problems differently.
>>>
>>> What is you oppinion?  Should I create a JIRA issue for that?
>>>
>>> Thank you!
>>> Alex Objelean
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/-RFE--WebRequestCodingStrategy.decode-tp23845496p23845588.html
> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>
>

Re: [RFE] WebRequestCodingStrategy.decode

by igor.vaynberg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Jun 2, 2009 at 10:35 PM, Alex Objelean <alex_objelean@...> wrote:
>
> Hi Igor,
> I can't see how this fix would break anything as long as
> DecodeRuntimeException is still a WicketRuntimeException.

right, missed that part of your email. that sounds ok.

> Your suggestion, to override the WebRequestCodingStrategy isn't an option,
> just because WebRequestCodingStrategy#decode(Request) method is final.

sure it is, webrequestcodingstrategy is an interface, if you cant
subclass then decorate.

-igor

>
> Thank you!
> Alex Objelean
>
>
>
> igor.vaynberg wrote:
>>
>> we should not fix this in 1.4, and there is already a jira for this in
>> 1.5. we should not fix it in 1.4 because there are existing production
>> sites that may depend on the current behavior and we should try not to
>> break them. the problem with this version is that due to various
>> reasons it got dragged out for quiet a while and there were production
>> sites running even on milestones because they were pretty stable. i
>> think we should just finish 1.4 and move on to 1.5 where we can fix
>> all these things.
>>
>> in the meanwhile users can always subclass the strategies, catch the
>> exceptions, and redirect to 404 if this is a big problem.
>>
>> -igor
>>
>> On Tue, Jun 2, 2009 at 10:25 PM, Alex Objelean <alex_objelean@...>
>> wrote:
>>>
>>> Could it be fixed in wicket-1.4-rc5 release?
>>>
>>> Thanks!
>>> Alex Objelean
>>>
>>>
>>> Jeremy Thomerson-5 wrote:
>>>>
>>>> Sounds feasible to me.  Definitely add a JIRA so that it gets tracked.
>>>>  A patch will get it committed even sooner.
>>>>
>>>> --
>>>> Jeremy Thomerson
>>>> http://www.wickettraining.com
>>>>
>>>>
>>>>
>>>>
>>>> On Wed, Jun 3, 2009 at 12:12 AM, Objelean Alex <alex.objelean@...>
>>>> wrote:
>>>>> I know it may sound strange, but I have this request in my
>>>>> application:  if user tweaks an url ending with "wicket:interface =
>>>>> :0::::" & add some kind of characters at the end, like "? or !", the
>>>>> page must be redirected to 404 instead of InternalError page. I know
>>>>> that I can catch WicketRuntimeException & redirect always to 404, but
>>>>> this would hide other potential problems because
>>>>> WicketRuntimeException can be caused by other types of problems.
>>>>>
>>>>> My suggestion is to throw a more specific RuntimeException in the
>>>>> WebRequestCodingStrategy.decode method, like DecodeRequestException
>>>>> (subclass of WicketRuntimeException). This way, I can treat only this
>>>>> kind of problems differently.
>>>>>
>>>>> What is you oppinion?  Should I create a JIRA issue for that?
>>>>>
>>>>> Thank you!
>>>>> Alex Objelean
>>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/-RFE--WebRequestCodingStrategy.decode-tp23845496p23845588.html
>>> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/-RFE--WebRequestCodingStrategy.decode-tp23845496p23845652.html
> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>
>

Re: [RFE] WebRequestCodingStrategy.decode

by Alexandru Objelean :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You're right, forgot about this option :).... So, if it will not be included in rc5, I will use a decorator as a workaround. Still, I hope it will be included :)

Thanks!
Alex Objelean

igor.vaynberg wrote:
> Your suggestion, to override the WebRequestCodingStrategy isn't an option,
> just because WebRequestCodingStrategy#decode(Request) method is final.

sure it is, webrequestcodingstrategy is an interface, if you cant
subclass then decorate.

-igor

>
> Thank you!
> Alex Objelean
>
>
>
> igor.vaynberg wrote:
>>
>> we should not fix this in 1.4, and there is already a jira for this in
>> 1.5. we should not fix it in 1.4 because there are existing production
>> sites that may depend on the current behavior and we should try not to
>> break them. the problem with this version is that due to various
>> reasons it got dragged out for quiet a while and there were production
>> sites running even on milestones because they were pretty stable. i
>> think we should just finish 1.4 and move on to 1.5 where we can fix
>> all these things.
>>
>> in the meanwhile users can always subclass the strategies, catch the
>> exceptions, and redirect to 404 if this is a big problem.
>>
>> -igor
>>
>> On Tue, Jun 2, 2009 at 10:25 PM, Alex Objelean <alex_objelean@yahoo.com>
>> wrote:
>>>
>>> Could it be fixed in wicket-1.4-rc5 release?
>>>
>>> Thanks!
>>> Alex Objelean
>>>
>>>
>>> Jeremy Thomerson-5 wrote:
>>>>
>>>> Sounds feasible to me.  Definitely add a JIRA so that it gets tracked.
>>>>  A patch will get it committed even sooner.
>>>>
>>>> --
>>>> Jeremy Thomerson
>>>> http://www.wickettraining.com
>>>>
>>>>
>>>>
>>>>
>>>> On Wed, Jun 3, 2009 at 12:12 AM, Objelean Alex <alex.objelean@gmail.com>
>>>> wrote:
>>>>> I know it may sound strange, but I have this request in my
>>>>> application:  if user tweaks an url ending with "wicket:interface =
>>>>> :0::::" & add some kind of characters at the end, like "? or !", the
>>>>> page must be redirected to 404 instead of InternalError page. I know
>>>>> that I can catch WicketRuntimeException & redirect always to 404, but
>>>>> this would hide other potential problems because
>>>>> WicketRuntimeException can be caused by other types of problems.
>>>>>
>>>>> My suggestion is to throw a more specific RuntimeException in the
>>>>> WebRequestCodingStrategy.decode method, like DecodeRequestException
>>>>> (subclass of WicketRuntimeException). This way, I can treat only this
>>>>> kind of problems differently.
>>>>>
>>>>> What is you oppinion?  Should I create a JIRA issue for that?
>>>>>
>>>>> Thank you!
>>>>> Alex Objelean
>>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/-RFE--WebRequestCodingStrategy.decode-tp23845496p23845588.html
>>> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/-RFE--WebRequestCodingStrategy.decode-tp23845496p23845652.html
> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>
>

Re: [RFE] WebRequestCodingStrategy.decode

by jthomerson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Provide a patch and it is much more likely to be included.

Igor, do you see a problem with including it in rc5 now that you saw
the additional information?

--
Jeremy Thomerson
http://www.wickettraining.com




On Wed, Jun 3, 2009 at 12:53 AM, Alex Objelean <alex_objelean@...> wrote:

>
> You're right, forgot about this option :).... So, if it will not be included
> in rc5, I will use a decorator as a workaround. Still, I hope it will be
> included :)
>
> Thanks!
> Alex Objelean
>
>
> igor.vaynberg wrote:
>>
>>> Your suggestion, to override the WebRequestCodingStrategy isn't an
>>> option,
>>> just because WebRequestCodingStrategy#decode(Request) method is final.
>>
>> sure it is, webrequestcodingstrategy is an interface, if you cant
>> subclass then decorate.
>>
>> -igor
>>
>>>
>>> Thank you!
>>> Alex Objelean
>>>
>>>
>>>
>>> igor.vaynberg wrote:
>>>>
>>>> we should not fix this in 1.4, and there is already a jira for this in
>>>> 1.5. we should not fix it in 1.4 because there are existing production
>>>> sites that may depend on the current behavior and we should try not to
>>>> break them. the problem with this version is that due to various
>>>> reasons it got dragged out for quiet a while and there were production
>>>> sites running even on milestones because they were pretty stable. i
>>>> think we should just finish 1.4 and move on to 1.5 where we can fix
>>>> all these things.
>>>>
>>>> in the meanwhile users can always subclass the strategies, catch the
>>>> exceptions, and redirect to 404 if this is a big problem.
>>>>
>>>> -igor
>>>>
>>>> On Tue, Jun 2, 2009 at 10:25 PM, Alex Objelean <alex_objelean@...>
>>>> wrote:
>>>>>
>>>>> Could it be fixed in wicket-1.4-rc5 release?
>>>>>
>>>>> Thanks!
>>>>> Alex Objelean
>>>>>
>>>>>
>>>>> Jeremy Thomerson-5 wrote:
>>>>>>
>>>>>> Sounds feasible to me.  Definitely add a JIRA so that it gets tracked.
>>>>>>  A patch will get it committed even sooner.
>>>>>>
>>>>>> --
>>>>>> Jeremy Thomerson
>>>>>> http://www.wickettraining.com
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Wed, Jun 3, 2009 at 12:12 AM, Objelean Alex
>>>>>> <alex.objelean@...>
>>>>>> wrote:
>>>>>>> I know it may sound strange, but I have this request in my
>>>>>>> application:  if user tweaks an url ending with "wicket:interface =
>>>>>>> :0::::" & add some kind of characters at the end, like "? or !", the
>>>>>>> page must be redirected to 404 instead of InternalError page. I know
>>>>>>> that I can catch WicketRuntimeException & redirect always to 404, but
>>>>>>> this would hide other potential problems because
>>>>>>> WicketRuntimeException can be caused by other types of problems.
>>>>>>>
>>>>>>> My suggestion is to throw a more specific RuntimeException in the
>>>>>>> WebRequestCodingStrategy.decode method, like DecodeRequestException
>>>>>>> (subclass of WicketRuntimeException). This way, I can treat only this
>>>>>>> kind of problems differently.
>>>>>>>
>>>>>>> What is you oppinion?  Should I create a JIRA issue for that?
>>>>>>>
>>>>>>> Thank you!
>>>>>>> Alex Objelean
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/-RFE--WebRequestCodingStrategy.decode-tp23845496p23845588.html
>>>>> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/-RFE--WebRequestCodingStrategy.decode-tp23845496p23845652.html
>>> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/-RFE--WebRequestCodingStrategy.decode-tp23845496p23845789.html
> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>
>

Re: [RFE] WebRequestCodingStrategy.decode

by igor.vaynberg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

no problems. it should work without disrupting existing systems. i
misread the original email to state that we should automatically
return 404 if an exception is thrown. as long as we do not do that we
wont disrupt anything out there.

-igor

On Tue, Jun 2, 2009 at 10:54 PM, Jeremy Thomerson
<jeremy@...> wrote:

> Provide a patch and it is much more likely to be included.
>
> Igor, do you see a problem with including it in rc5 now that you saw
> the additional information?
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
>
> On Wed, Jun 3, 2009 at 12:53 AM, Alex Objelean <alex_objelean@...> wrote:
>>
>> You're right, forgot about this option :).... So, if it will not be included
>> in rc5, I will use a decorator as a workaround. Still, I hope it will be
>> included :)
>>
>> Thanks!
>> Alex Objelean
>>
>>
>> igor.vaynberg wrote:
>>>
>>>> Your suggestion, to override the WebRequestCodingStrategy isn't an
>>>> option,
>>>> just because WebRequestCodingStrategy#decode(Request) method is final.
>>>
>>> sure it is, webrequestcodingstrategy is an interface, if you cant
>>> subclass then decorate.
>>>
>>> -igor
>>>
>>>>
>>>> Thank you!
>>>> Alex Objelean
>>>>
>>>>
>>>>
>>>> igor.vaynberg wrote:
>>>>>
>>>>> we should not fix this in 1.4, and there is already a jira for this in
>>>>> 1.5. we should not fix it in 1.4 because there are existing production
>>>>> sites that may depend on the current behavior and we should try not to
>>>>> break them. the problem with this version is that due to various
>>>>> reasons it got dragged out for quiet a while and there were production
>>>>> sites running even on milestones because they were pretty stable. i
>>>>> think we should just finish 1.4 and move on to 1.5 where we can fix
>>>>> all these things.
>>>>>
>>>>> in the meanwhile users can always subclass the strategies, catch the
>>>>> exceptions, and redirect to 404 if this is a big problem.
>>>>>
>>>>> -igor
>>>>>
>>>>> On Tue, Jun 2, 2009 at 10:25 PM, Alex Objelean <alex_objelean@...>
>>>>> wrote:
>>>>>>
>>>>>> Could it be fixed in wicket-1.4-rc5 release?
>>>>>>
>>>>>> Thanks!
>>>>>> Alex Objelean
>>>>>>
>>>>>>
>>>>>> Jeremy Thomerson-5 wrote:
>>>>>>>
>>>>>>> Sounds feasible to me.  Definitely add a JIRA so that it gets tracked.
>>>>>>>  A patch will get it committed even sooner.
>>>>>>>
>>>>>>> --
>>>>>>> Jeremy Thomerson
>>>>>>> http://www.wickettraining.com
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Jun 3, 2009 at 12:12 AM, Objelean Alex
>>>>>>> <alex.objelean@...>
>>>>>>> wrote:
>>>>>>>> I know it may sound strange, but I have this request in my
>>>>>>>> application:  if user tweaks an url ending with "wicket:interface =
>>>>>>>> :0::::" & add some kind of characters at the end, like "? or !", the
>>>>>>>> page must be redirected to 404 instead of InternalError page. I know
>>>>>>>> that I can catch WicketRuntimeException & redirect always to 404, but
>>>>>>>> this would hide other potential problems because
>>>>>>>> WicketRuntimeException can be caused by other types of problems.
>>>>>>>>
>>>>>>>> My suggestion is to throw a more specific RuntimeException in the
>>>>>>>> WebRequestCodingStrategy.decode method, like DecodeRequestException
>>>>>>>> (subclass of WicketRuntimeException). This way, I can treat only this
>>>>>>>> kind of problems differently.
>>>>>>>>
>>>>>>>> What is you oppinion?  Should I create a JIRA issue for that?
>>>>>>>>
>>>>>>>> Thank you!
>>>>>>>> Alex Objelean
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://www.nabble.com/-RFE--WebRequestCodingStrategy.decode-tp23845496p23845588.html
>>>>>> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/-RFE--WebRequestCodingStrategy.decode-tp23845496p23845652.html
>>>> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context: http://www.nabble.com/-RFE--WebRequestCodingStrategy.decode-tp23845496p23845789.html
>> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>>
>>
>

Re: [RFE] WebRequestCodingStrategy.decode

by Alexandru Objelean :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Patch attached..

Alex Objelean

Jeremy Thomerson-5 wrote:
Provide a patch and it is much more likely to be included.

Igor, do you see a problem with including it in rc5 now that you saw
the additional information?

--
Jeremy Thomerson
http://www.wickettraining.com




On Wed, Jun 3, 2009 at 12:53 AM, Alex Objelean <alex_objelean@yahoo.com> wrote:
>
> You're right, forgot about this option :).... So, if it will not be included
> in rc5, I will use a decorator as a workaround. Still, I hope it will be
> included :)
>
> Thanks!
> Alex Objelean
>
>
> igor.vaynberg wrote:
>>
>>> Your suggestion, to override the WebRequestCodingStrategy isn't an
>>> option,
>>> just because WebRequestCodingStrategy#decode(Request) method is final.
>>
>> sure it is, webrequestcodingstrategy is an interface, if you cant
>> subclass then decorate.
>>
>> -igor
>>
>>>
>>> Thank you!
>>> Alex Objelean
>>>
>>>
>>>
>>> igor.vaynberg wrote:
>>>>
>>>> we should not fix this in 1.4, and there is already a jira for this in
>>>> 1.5. we should not fix it in 1.4 because there are existing production
>>>> sites that may depend on the current behavior and we should try not to
>>>> break them. the problem with this version is that due to various
>>>> reasons it got dragged out for quiet a while and there were production
>>>> sites running even on milestones because they were pretty stable. i
>>>> think we should just finish 1.4 and move on to 1.5 where we can fix
>>>> all these things.
>>>>
>>>> in the meanwhile users can always subclass the strategies, catch the
>>>> exceptions, and redirect to 404 if this is a big problem.
>>>>
>>>> -igor
>>>>
>>>> On Tue, Jun 2, 2009 at 10:25 PM, Alex Objelean <alex_objelean@yahoo.com>
>>>> wrote:
>>>>>
>>>>> Could it be fixed in wicket-1.4-rc5 release?
>>>>>
>>>>> Thanks!
>>>>> Alex Objelean
>>>>>
>>>>>
>>>>> Jeremy Thomerson-5 wrote:
>>>>>>
>>>>>> Sounds feasible to me.  Definitely add a JIRA so that it gets tracked.
>>>>>>  A patch will get it committed even sooner.
>>>>>>
>>>>>> --
>>>>>> Jeremy Thomerson
>>>>>> http://www.wickettraining.com
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Wed, Jun 3, 2009 at 12:12 AM, Objelean Alex
>>>>>> <alex.objelean@gmail.com>
>>>>>> wrote:
>>>>>>> I know it may sound strange, but I have this request in my
>>>>>>> application:  if user tweaks an url ending with "wicket:interface =
>>>>>>> :0::::" & add some kind of characters at the end, like "? or !", the
>>>>>>> page must be redirected to 404 instead of InternalError page. I know
>>>>>>> that I can catch WicketRuntimeException & redirect always to 404, but
>>>>>>> this would hide other potential problems because
>>>>>>> WicketRuntimeException can be caused by other types of problems.
>>>>>>>
>>>>>>> My suggestion is to throw a more specific RuntimeException in the
>>>>>>> WebRequestCodingStrategy.decode method, like DecodeRequestException
>>>>>>> (subclass of WicketRuntimeException). This way, I can treat only this
>>>>>>> kind of problems differently.
>>>>>>>
>>>>>>> What is you oppinion?  Should I create a JIRA issue for that?
>>>>>>>
>>>>>>> Thank you!
>>>>>>> Alex Objelean
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/-RFE--WebRequestCodingStrategy.decode-tp23845496p23845588.html
>>>>> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/-RFE--WebRequestCodingStrategy.decode-tp23845496p23845652.html
>>> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/-RFE--WebRequestCodingStrategy.decode-tp23845496p23845789.html
> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>
>