[Hippo-cms7-dev] [HippoCMS-svn] [37907] hippo-cms7/addons/addon-brokenlinks: CMS7-6794: Broken links: Status for server not found unclear

Bart van der Schans b.vanderschans at onehippo.com
Wed Jan 16 17:50:08 CET 2013


Ok, that explains it. Thx.

Bart

On Wed, Jan 16, 2013 at 1:06 PM, Olivier Bourgeois
<o.bourgeois at onehippo.com> wrote:
> Indeed, it's borderline, but the thing is that it would require some
> not-so-light refactoring (changing column handling, exception handling,
> localized error message set-up, etc..) in the 2.22.xx branch, and, as a
> matter of fact, all of this work has been done in the 2.24.xx branch when
> the plugin have been integrated into core CMS.
>
> The bottom line is that I used this hackish way because I am sure there
> won't be any regressions, and all I wanted is to fix the related client
> issue.
>
> If I had to port this to 2.24.xx, there is no need to hijack HTTP status
> codes: localized message handling is done the right way in 2.24.xx and it's
> just a matter of patching
> org.onehippo.cms7.reports.plugins.brokenlinkslist.BrokenLinksListColumns.BrokenLinksStatusColumn
>
> regards,
>
> Olivier.
>
>
>
>
> On Wed, Jan 16, 2013 at 12:09 PM, Bart van der Schans
> <b.vanderschans at onehippo.com> wrote:
>>
>> Hi,
>>
>> On Wed, Jan 16, 2013 at 11:03 AM, obourgeois <svn-logs at onehippo.org>
>> wrote:
>> > Revision: 37907
>> > Author:   obourgeois
>> > Date:     2013-01-16 11:03:38 +0100 (Wed, 16 Jan 2013)
>> > Log Message:
>> > -----------
>> > CMS7-6794: Broken links: Status for server not found unclear
>> >
>> > Modified Paths:
>> > --------------
>> >
>> > hippo-cms7/addons/addon-brokenlinks/branches/hippo-addon-brokenlinks-2.22.xx/frontend/src/main/java/org/onehippo/cms7/reports/plugins/brokenlinkslist/BrokenLinksListColumns.java
>> >
>> > hippo-cms7/addons/addon-brokenlinks/branches/hippo-addon-brokenlinks-2.22.xx/frontend/src/main/java/org/onehippo/cms7/reports/plugins/brokenlinkslist/BrokenLinksListColumns.properties
>> >
>> > hippo-cms7/addons/addon-brokenlinks/branches/hippo-addon-brokenlinks-2.22.xx/frontend/src/main/java/org/onehippo/cms7/reports/plugins/brokenlinkslist/BrokenLinksListColumns_de.properties
>> >
>> > hippo-cms7/addons/addon-brokenlinks/branches/hippo-addon-brokenlinks-2.22.xx/frontend/src/main/java/org/onehippo/cms7/reports/plugins/brokenlinkslist/BrokenLinksListColumns_fr.properties
>> >
>> > hippo-cms7/addons/addon-brokenlinks/branches/hippo-addon-brokenlinks-2.22.xx/repository/src/main/java/org/onehippo/cms7/brokenlinks/LinkChecker.java
>> >
>> > Modified:
>> > hippo-cms7/addons/addon-brokenlinks/branches/hippo-addon-brokenlinks-2.22.xx/frontend/src/main/java/org/onehippo/cms7/reports/plugins/brokenlinkslist/BrokenLinksListColumns.java
>> > ===================================================================
>> > ---
>> > hippo-cms7/addons/addon-brokenlinks/branches/hippo-addon-brokenlinks-2.22.xx/frontend/src/main/java/org/onehippo/cms7/reports/plugins/brokenlinkslist/BrokenLinksListColumns.java
>> > 2013-01-15 15:46:26 UTC (rev 37906)
>> > +++
>> > hippo-cms7/addons/addon-brokenlinks/branches/hippo-addon-brokenlinks-2.22.xx/frontend/src/main/java/org/onehippo/cms7/reports/plugins/brokenlinkslist/BrokenLinksListColumns.java
>> > 2013-01-16 10:03:38 UTC (rev 37907)
>> > @@ -69,7 +69,7 @@
>> >          DOCUMENT_COLUMN_MAP.put(ColumnName.brokenlinksStatus, new
>> > BrokenLinksStatusColumn());
>> >
>> >          //Broken Links supported status codes. Supported means there
>> > are translations and maybe custom messages for these codes
>> > -        Collections.addAll(supportedHttpStatusCodes, 301, 400, 401,
>> > 403, 404, 405, 414, 415, 500, 502, 503);
>> > +        Collections.addAll(supportedHttpStatusCodes, 301, 400, 401,
>> > 403, 404, 405, 414, 415, 500, 502, 503, 999);
>> >      }
>>
>> I don't really know what the issue is about, but in general I don't
>> think it's a good idea to invent our own or abuse http status codes
>> for other purposes and it feels a bit hacky. Http status codes are
>> well defined and create some expectation. If we need to be able to
>> handle other errors (and there are many many many many things that can
>> go wrong while checking a link) we should accommodate for that in the
>> code with some proper exception handling.
>>
>> Regards,
>> Bart
>
>



-- 
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com


More information about the Hippo-cms7-dev mailing list