| Summary: | [Webapp] Eclipse Help System does not send the HTTP 404 response code when a topic is missing | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Eero Helenius <eero.helenius> | ||||
| Component: | User Assistance | Assignee: | platform-ua-inbox <platform-ua-inbox> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||
| Severity: | major | ||||||
| Priority: | P3 | CC: | bsd, cgold, daniel_megert, Lars.Vogel, markus.kell.r, psuzzi | ||||
| Version: | 4.2 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | stalebug | ||||||
| Attachments: |
|
||||||
|
Description
Eero Helenius
Created attachment 202130 [details]
A screenshot of the Network tab of Chrome developer tools.
As you can see, the response code is 200 even though the topic clearly doesn't exist.
There is a preference which can be used to cause the help system to return a 404 status instead of the error page: It is org.eclipse.help.base/page_not_found and if set to an empty string a 404 code will be returned for any broken links. See http://help.eclipse.org/indigo/topic/org.eclipse.platform.doc.isv/guide/ua_help_setup_preferences.htm (In reply to comment #2) > There is a preference which can be used to cause the help system to return a > 404 status instead of the error page: It is > org.eclipse.help.base/page_not_found and if set to an empty string a 404 code > will be returned for any broken links. > > See > http://help.eclipse.org/indigo/topic/org.eclipse.platform.doc.isv/guide/ua_help_setup_preferences.htm Thanks, that works! That tip might be worth mentioning explicitly on the page you linked, too. However, if you define a custom 404 page (something like this: org.eclipse.help.base/page_not_found=/customization/404.html), the Eclipse Help system won't return a 404 code but a 200 OK code. Would it be possible to make the Eclipse Help system return a 404 when a custom 404 page is defined? Thanks again for the tip! (In reply to comment #3) > > However, if you define a custom 404 page (something like this: > org.eclipse.help.base/page_not_found=/customization/404.html), the Eclipse Help > system won't return a 404 code but a 200 OK code. > > Would it be possible to make the Eclipse Help system return a 404 when a custom > 404 page is defined? > I recall there was some reason for not doing that. I would have to look at the history of the bug report which added the 404 status to see if I can find out more information. I saw this comment one one commit to EclipseConnector.java: Stopped setting 404 status when an error page is presented because some custom pages would not display unless the status was OK. As I recall for a while 404 was returned for all broken links, even if the error page was defined but it caused unwanted side effects and was backed out. I'm resolving this bug as as WONTFIX because I don't want to reinrtoduce any side effects. (In reply to comment #5) > I saw this comment one one commit to EclipseConnector.java: > > Stopped setting 404 status when an error page is presented because some custom > pages would not display unless the status was OK. > > As I recall for a while 404 was returned for all broken links, even if the > error page was defined but it caused unwanted side effects and was backed out. > I'm resolving this bug as as WONTFIX because I don't want to reinrtoduce any > side effects. Hi Chris, That's understandable. Thanks for the earlier tip, nonetheless, it's quite sufficient for our purposes for now. Reopening, since
a) not returning a 404 is just wrong
b) the wrong default and the
org.eclipse.help.base/page_not_found=""
hack are not described in the ua_help_setup_preferences.htm doc
c) no reason was given for why the broken behavior would help anyone.
Looks like this was once fixed with bug 68518 but then http://git.eclipse.org/c/platform/eclipse.platform.ua.git/commit/?id=5fc81f08b2431c2af7df9794eff86f178d0a9d57 reintroduced the bug without any explanation
I think we should just revert that commit (and its child commit).
Here's the concrete workaround (tested in 4.5): * Create file "<path-to-your>/pluginCustomization.ini" with contents: # hack around Bug 355810: [Webapp] Eclipse Help System does not send the HTTP 404 response code when a topic is missing org.eclipse.help.base/page_not_found="" * Add this your command line / eclipse.ini: -pluginCustomization <path-to-your>/pluginCustomization.ini Moving to 4.7. Please move back to 4.6 RC2 if you think that is important enough and if you plan to provide a Gerrit review.. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |