You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Mike Youngstrom (JIRA)" <de...@myfaces.apache.org> on 2006/09/11 21:46:22 UTC

[jira] Created: (TOMAHAWK-668) response stream closed in MyFacesResourceLoader.writeResource

response stream closed in MyFacesResourceLoader.writeResource
-------------------------------------------------------------

                 Key: TOMAHAWK-668
                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-668
             Project: MyFaces Tomahawk
          Issue Type: Bug
          Components: ExtensionsFilter
    Affects Versions: 1.1.3
            Reporter: Mike Youngstrom
             Fix For: 1.1.4-SNAPSHOT


I was looking through the ExtensionsFilter code and noticed that MyFacesResourceLoader.writeResource closes the response output stream.  Is that desirable?  I also noticed that the resource input stream was not being closed.  I've provided a small patch to change those two things.  If they seem reasonable.

Mike

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (TOMAHAWK-668) response stream closed in MyFacesResourceLoader.writeResource

Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-668?page=comments#action_12436297 ] 
            
Martin Marinschek commented on TOMAHAWK-668:
--------------------------------------------

I understand the necessity of closing the input-stream. But why not closing the ouput-stream? Anyways, I applied the first half of the patch.

regards,

Martin

> response stream closed in MyFacesResourceLoader.writeResource
> -------------------------------------------------------------
>
>                 Key: TOMAHAWK-668
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-668
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: ExtensionsFilter
>    Affects Versions: 1.1.3
>            Reporter: Mike Youngstrom
>         Assigned To: Martin Marinschek
>             Fix For: 1.1.4-SNAPSHOT
>
>         Attachments: patch.diff
>
>
> I was looking through the ExtensionsFilter code and noticed that MyFacesResourceLoader.writeResource closes the response output stream.  Is that desirable?  I also noticed that the resource input stream was not being closed.  I've provided a small patch to change those two things.  If they seem reasonable.
> Mike

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (TOMAHAWK-668) response stream closed in MyFacesResourceLoader.writeResource

Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-668?page=comments#action_12436373 ] 
            
Martin Marinschek commented on TOMAHAWK-668:
--------------------------------------------

Well, yes - it doesn't really make sense to do anything with the written resource anymore. 

And if you'd want to change the response, you'd provide a wrapper around the response, and what you do there, is something entirely different.

regards,

Martin

> response stream closed in MyFacesResourceLoader.writeResource
> -------------------------------------------------------------
>
>                 Key: TOMAHAWK-668
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-668
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: ExtensionsFilter
>    Affects Versions: 1.1.3
>            Reporter: Mike Youngstrom
>         Assigned To: Martin Marinschek
>             Fix For: 1.1.4-SNAPSHOT
>
>         Attachments: patch.diff
>
>
> I was looking through the ExtensionsFilter code and noticed that MyFacesResourceLoader.writeResource closes the response output stream.  Is that desirable?  I also noticed that the resource input stream was not being closed.  I've provided a small patch to change those two things.  If they seem reasonable.
> Mike

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (TOMAHAWK-668) response stream closed in MyFacesResourceLoader.writeResource

Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/TOMAHAWK-668?page=all ]

Martin Marinschek updated TOMAHAWK-668:
---------------------------------------

        Status: Resolved  (was: Patch Available)
    Resolution: Fixed

> response stream closed in MyFacesResourceLoader.writeResource
> -------------------------------------------------------------
>
>                 Key: TOMAHAWK-668
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-668
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: ExtensionsFilter
>    Affects Versions: 1.1.3
>            Reporter: Mike Youngstrom
>         Assigned To: Martin Marinschek
>             Fix For: 1.1.4-SNAPSHOT
>
>         Attachments: patch.diff
>
>
> I was looking through the ExtensionsFilter code and noticed that MyFacesResourceLoader.writeResource closes the response output stream.  Is that desirable?  I also noticed that the resource input stream was not being closed.  I've provided a small patch to change those two things.  If they seem reasonable.
> Mike

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (TOMAHAWK-668) response stream closed in MyFacesResourceLoader.writeResource

Posted by "Mike Youngstrom (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-668?page=comments#action_12436310 ] 
            
Mike Youngstrom commented on TOMAHAWK-668:
------------------------------------------

Sounds good to me.  This might be my lack of servlet and filter programming experience showing through, but, I just always figured it was good practice to let the container close your output stream so that other filters can decarate the stream provided.  Granted in this case you probably don't want other filters decarating the resources you return from ExtensionFilter. :)

Or is it part of the spec that the conainer provide a wrapped stream to requests for getOutputStream so your not really closing the stream?  Either way sounds good to me.

Mike

> response stream closed in MyFacesResourceLoader.writeResource
> -------------------------------------------------------------
>
>                 Key: TOMAHAWK-668
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-668
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: ExtensionsFilter
>    Affects Versions: 1.1.3
>            Reporter: Mike Youngstrom
>         Assigned To: Martin Marinschek
>             Fix For: 1.1.4-SNAPSHOT
>
>         Attachments: patch.diff
>
>
> I was looking through the ExtensionsFilter code and noticed that MyFacesResourceLoader.writeResource closes the response output stream.  Is that desirable?  I also noticed that the resource input stream was not being closed.  I've provided a small patch to change those two things.  If they seem reasonable.
> Mike

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (TOMAHAWK-668) response stream closed in MyFacesResourceLoader.writeResource

Posted by "Mike Youngstrom (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/TOMAHAWK-668?page=all ]

Mike Youngstrom updated TOMAHAWK-668:
-------------------------------------

    Status: Patch Available  (was: Open)

> response stream closed in MyFacesResourceLoader.writeResource
> -------------------------------------------------------------
>
>                 Key: TOMAHAWK-668
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-668
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: ExtensionsFilter
>    Affects Versions: 1.1.3
>            Reporter: Mike Youngstrom
>             Fix For: 1.1.4-SNAPSHOT
>
>
> I was looking through the ExtensionsFilter code and noticed that MyFacesResourceLoader.writeResource closes the response output stream.  Is that desirable?  I also noticed that the resource input stream was not being closed.  I've provided a small patch to change those two things.  If they seem reasonable.
> Mike

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira