You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Yuen Kaayan (JIRA)" <ji...@apache.org> on 2010/11/17 19:11:14 UTC

[jira] Created: (WICKET-3176) URLResourceStream loads target content twice.

URLResourceStream loads target content twice.
---------------------------------------------

                 Key: WICKET-3176
                 URL: https://issues.apache.org/jira/browse/WICKET-3176
             Project: Wicket
          Issue Type: Improvement
          Components: wicket
    Affects Versions: 1.4.12
         Environment: Jetty 7.2, Wicket 1.4.12, Eclipse 3.6
            Reporter: Yuen Kaayan


In PageA.class, there is an 'Include' component that tries to load http://localhost:8080/page-b.
In PageB.class, which is mounted as 'page-b', will print some dummy letters when class is initialized.

When web server is requested to load PageA, server console will print the dummy letters twice. That is, one request will print 2 lines of dummy letters.

I traced into Include.class, it uses URLResourceStream.class to load the URL. 
After reading the source, I found this URLResourceStream.class requested the URL twice: 1st in the constructor, 2nd in getInputStream().

Can this be amended to request once to save some bandwith/server time?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-3176) URLResourceStream loads target content twice.

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-3176.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5-M4

Fixed in 1.5 with r1041559.
Will not be merged back to 1.4 because this resource stream is quite critical for Wicket internals and we don't want to compromise the stable branch.

> URLResourceStream loads target content twice.
> ---------------------------------------------
>
>                 Key: WICKET-3176
>                 URL: https://issues.apache.org/jira/browse/WICKET-3176
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.12
>         Environment: Jetty 7.2, Wicket 1.4.12, Eclipse 3.6
>            Reporter: Yuen Kaayan
>            Assignee: Martin Grigorov
>             Fix For: 1.5-M4
>
>         Attachments: WICKET-3176.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> In PageA.class, there is an 'Include' component that tries to load http://localhost:8080/page-b.
> In PageB.class, which is mounted as 'page-b', will print some dummy letters when class is initialized.
> When web server is requested to load PageA, server console will print the dummy letters twice. That is, one request will print 2 lines of dummy letters.
> I traced into Include.class, it uses URLResourceStream.class to load the URL. 
> After reading the source, I found this URLResourceStream.class requested the URL twice: 1st in the constructor, 2nd in getInputStream().
> Can this be amended to request once to save some bandwith/server time?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3176) URLResourceStream loads target content twice.

Posted by "Peter Ertl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12935593#action_12935593 ] 

Peter Ertl commented on WICKET-3176:
------------------------------------

+1

> URLResourceStream loads target content twice.
> ---------------------------------------------
>
>                 Key: WICKET-3176
>                 URL: https://issues.apache.org/jira/browse/WICKET-3176
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.12
>         Environment: Jetty 7.2, Wicket 1.4.12, Eclipse 3.6
>            Reporter: Yuen Kaayan
>            Assignee: Martin Grigorov
>         Attachments: WICKET-3176.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> In PageA.class, there is an 'Include' component that tries to load http://localhost:8080/page-b.
> In PageB.class, which is mounted as 'page-b', will print some dummy letters when class is initialized.
> When web server is requested to load PageA, server console will print the dummy letters twice. That is, one request will print 2 lines of dummy letters.
> I traced into Include.class, it uses URLResourceStream.class to load the URL. 
> After reading the source, I found this URLResourceStream.class requested the URL twice: 1st in the constructor, 2nd in getInputStream().
> Can this be amended to request once to save some bandwith/server time?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (WICKET-3176) URLResourceStream loads target content twice.

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov reassigned WICKET-3176:
---------------------------------------

    Assignee: Martin Grigorov

> URLResourceStream loads target content twice.
> ---------------------------------------------
>
>                 Key: WICKET-3176
>                 URL: https://issues.apache.org/jira/browse/WICKET-3176
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.12
>         Environment: Jetty 7.2, Wicket 1.4.12, Eclipse 3.6
>            Reporter: Yuen Kaayan
>            Assignee: Martin Grigorov
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> In PageA.class, there is an 'Include' component that tries to load http://localhost:8080/page-b.
> In PageB.class, which is mounted as 'page-b', will print some dummy letters when class is initialized.
> When web server is requested to load PageA, server console will print the dummy letters twice. That is, one request will print 2 lines of dummy letters.
> I traced into Include.class, it uses URLResourceStream.class to load the URL. 
> After reading the source, I found this URLResourceStream.class requested the URL twice: 1st in the constructor, 2nd in getInputStream().
> Can this be amended to request once to save some bandwith/server time?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3176) URLResourceStream loads target content twice.

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov updated WICKET-3176:
------------------------------------

    Attachment: WICKET-3176.patch

A patch that makes URLResourceStream lazy.
All the settings (contentLength, contentType, lastModified, inputStream) are loaded on the first read request.

> URLResourceStream loads target content twice.
> ---------------------------------------------
>
>                 Key: WICKET-3176
>                 URL: https://issues.apache.org/jira/browse/WICKET-3176
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.12
>         Environment: Jetty 7.2, Wicket 1.4.12, Eclipse 3.6
>            Reporter: Yuen Kaayan
>            Assignee: Martin Grigorov
>         Attachments: WICKET-3176.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> In PageA.class, there is an 'Include' component that tries to load http://localhost:8080/page-b.
> In PageB.class, which is mounted as 'page-b', will print some dummy letters when class is initialized.
> When web server is requested to load PageA, server console will print the dummy letters twice. That is, one request will print 2 lines of dummy letters.
> I traced into Include.class, it uses URLResourceStream.class to load the URL. 
> After reading the source, I found this URLResourceStream.class requested the URL twice: 1st in the constructor, 2nd in getInputStream().
> Can this be amended to request once to save some bandwith/server time?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.