DSpace
  1. DSpace
  2. DS-768

All XMLUI Error Pages respond with 200 OK, instead of 404 Not Found

    Details

    • Type: Bug Bug
    • Status: Closed Closed (View Workflow)
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.8.0
    • Fix Version/s: 1.8.0
    • Component/s: XMLUI
    • Labels:
      None
    • Attachments:
      6
    • Comments:
      58

      Description

      In DSpace 1.7.0 RC1, the XMLUI "Page Not Found" page responds with a 200 OK, rather than the necessary 404 Not Found error.

      For example:
      http://demo.dspace.org/xmlui/NOTAVALIDPATH

      I believe this used to function properly in 1.6.x, but it seems to be broken now.

      Obviously, we want this to return a 404 Not Found, in order to ensure that search engines do not index "Page Not Found" responses.

      Furthermore, it has been discovered that all other XMLUI Error pages (Cocoon Errors or Invalid Continuation errors) also respond with 200 OK. In addition, it seems this affects all 1.6.x versions of DSpace, as the same responses can be found on http://dspace.mit.edu (currently running 1.6.0 with patches), and http://researchspace.auckland.ac.nz (currently running 1.6.2 with patches).
      1. [DS-768]_add_ProcessingException_to_transformers
        6 kB
        Kim Shepherd
      2. [DS-768]_dspace-cocoon-servlet-service-impl-1_0_2.patch
        13 kB
        Kim Shepherd
      3. add_ResourceNotFoundException_to_xmlui_transformers.patch
        5 kB
        Kim Shepherd
      1. Screen shot 2011-08-17 at 2.20.40 PM.png
        74 kB
      2. Screenshot-Resource not found-Mozilla Firefox.png
        119 kB

        Issue Links

          Activity

          Hide
          Tim Donohue added a comment -
          To slightly restate what I just "implied" above with my last statement. I think if we pull down the latest versions (HEAD) of HttpServletResponseBufferingWrapper.java & HttpServletResponseBufferingWrapperTestCase.java & commit both to our DSpace SCM, then that will resolve our issues.

          http://svn.apache.org/viewvc/cocoon/trunk/subprojects/cocoon-servlet-service/cocoon-servlet-service-impl/src/main/java/org/apache/cocoon/servletservice/HttpServletResponseBufferingWrapper.java

          http://svn.apache.org/viewvc/cocoon/trunk/subprojects/cocoon-servlet-service/cocoon-servlet-service-impl/src/test/java/org/apache/cocoon/servletservice/HttpServletResponseBufferingWrapperTestCase.java

          (famous last words) ;)
          Show
          Tim Donohue added a comment - To slightly restate what I just "implied" above with my last statement. I think if we pull down the latest versions (HEAD) of HttpServletResponseBufferingWrapper.java & HttpServletResponseBufferingWrapperTestCase.java & commit both to our DSpace SCM, then that will resolve our issues. http://svn.apache.org/viewvc/cocoon/trunk/subprojects/cocoon-servlet-service/cocoon-servlet-service-impl/src/main/java/org/apache/cocoon/servletservice/HttpServletResponseBufferingWrapper.java http://svn.apache.org/viewvc/cocoon/trunk/subprojects/cocoon-servlet-service/cocoon-servlet-service-impl/src/test/java/org/apache/cocoon/servletservice/HttpServletResponseBufferingWrapperTestCase.java (famous last words) ;)
          Hide
          Kim Shepherd added a comment -
          Good call Tim, I've tested that out and it all seems fine here, so I've committed the changes back to source. Nearly the end of the day here so after dinner I'll have a go at a sonatype release.
          Show
          Kim Shepherd added a comment - Good call Tim, I've tested that out and it all seems fine here, so I've committed the changes back to source. Nearly the end of the day here so after dinner I'll have a go at a sonatype release.
          Hide
          Tim Donohue added a comment -
          I re-tested since Kim re-patched the above classes (see r6800 in DSpace SCM). Everything now seems to be working perfectly. I get a 404 when accessing any invalid path (and continue to get a 404 if I keep accessing that same path over and over).

          I think the only things left to do are:
          * Release a 1.0.3 version of dspace-cocoon-servlet-service-impl to Maven Central
          * Once propagated to Maven Central, change the dependency in [Trunk]/dspace-xmlui/dspace-xmlui-wing/pom.xml to point at version 1.0.3 of dspace-cocoon-servlet-service-impl
          Show
          Tim Donohue added a comment - I re-tested since Kim re-patched the above classes (see r6800 in DSpace SCM). Everything now seems to be working perfectly. I get a 404 when accessing any invalid path (and continue to get a 404 if I keep accessing that same path over and over). I think the only things left to do are: * Release a 1.0.3 version of dspace-cocoon-servlet-service-impl to Maven Central * Once propagated to Maven Central, change the dependency in [Trunk]/dspace-xmlui/dspace-xmlui-wing/pom.xml to point at version 1.0.3 of dspace-cocoon-servlet-service-impl
          Hide
          Kim Shepherd added a comment -
          Version 1.0.3 of dspace-cocoon-servlet-service-impl released to sonatype
          Show
          Kim Shepherd added a comment - Version 1.0.3 of dspace-cocoon-servlet-service-impl released to sonatype
          Hide
          Robin Taylor added a comment -
          dspace-xmlui-wing/pom.xml updated to pick up version 1.0.3 of dspace-cocoon-servlet-service-impl. Committed to trunk revision 6811.

          Cheers, Robin.
          Show
          Robin Taylor added a comment - dspace-xmlui-wing/pom.xml updated to pick up version 1.0.3 of dspace-cocoon-servlet-service-impl. Committed to trunk revision 6811. Cheers, Robin.

            People

            • Assignee:
              Kim Shepherd
              Reporter:
              Tim Donohue
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: