DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10833>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10833

ResourceReader handles non-existing resource and closed connection the same

           Summary: ResourceReader handles non-existing resource and closed
                    connection the same
           Product: Cocoon 2
           Version: 2.0.2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: sitemap components
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


If you use ResourceReader to read static content and you enter a URL which maps 
to a non-existent resource, an IOException will be thrown and ResourceReader 
assumes the connection is closed by the user agent.

I think the correct behaviour if a resource does not exist, is to throw a 
ProcessingException. Then you can define an error handler to display an error 
message.

Below is a snippet of a sitemap which shows this behaviour:
    <map:match pattern="images/**.gif">
      <map:read src="static/images/{1}.gif" mime-type="image/gif"/>
    </map:match>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to