[jira] [Commented] (WICKET-6720) ConcatBundleResource#getResourceStream should not eagerly fetch resources
[ https://issues.apache.org/jira/browse/WICKET-6720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17000634#comment-17000634 ] Dennis Waldherr commented on WICKET-6720: - Wow, that was quick, thanks! > ConcatBundleResource#getResourceStream should not eagerly fetch resources > - > > Key: WICKET-6720 > URL: https://issues.apache.org/jira/browse/WICKET-6720 > Project: Wicket > Issue Type: Improvement > Components: wicket-core >Affects Versions: 8.5.0 >Reporter: Dennis Waldherr >Assignee: Sven Meier >Priority: Minor > Fix For: 8.7.0, 9.0.0-M4 > > > If {{ConcatBundleResource}} is used in conjunction with > {{LastModifiedResourceVersion}}, it will concatenate its resources for every > request, even if unchanged. > The reason for this is, that {{LastModifiedResourceVersion#getVersion}} uses > only {{lastModified}} of the {{getResourceStream}} call to determine a > version. But {{getResourceStream}} of {{ConcatBundleResource}} collects (and > compresses) for that call already. > This effectively cancels out any time saved by using the class in the first > place. > It should only collect and build the actual content "on demand". -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (WICKET-6720) ConcatBundleResource#getResourceStream should not eagerly fetch resources
Dennis Waldherr created WICKET-6720: --- Summary: ConcatBundleResource#getResourceStream should not eagerly fetch resources Key: WICKET-6720 URL: https://issues.apache.org/jira/browse/WICKET-6720 Project: Wicket Issue Type: Improvement Components: wicket-core Affects Versions: 8.5.0 Reporter: Dennis Waldherr If {{ConcatBundleResource}} is used in conjunction with {{LastModifiedResourceVersion}}, it will concatenate its resources for every request, even if unchanged. The reason for this is, that {{LastModifiedResourceVersion#getVersion}} uses only {{lastModified}} of the {{getResourceStream}} call to determine a version. But {{getResourceStream}} of {{ConcatBundleResource}} collects (and compresses) for that call already. This effectively cancels out any time saved by using the class in the first place. It should only collect and build the actual content "on demand". -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (WICKET-6720) ConcatBundleResource#getResourceStream should not eagerly fetch resources
[ https://issues.apache.org/jira/browse/WICKET-6720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dennis Waldherr updated WICKET-6720: Priority: Minor (was: Major) > ConcatBundleResource#getResourceStream should not eagerly fetch resources > - > > Key: WICKET-6720 > URL: https://issues.apache.org/jira/browse/WICKET-6720 > Project: Wicket > Issue Type: Improvement > Components: wicket-core >Affects Versions: 8.5.0 >Reporter: Dennis Waldherr >Priority: Minor > > If {{ConcatBundleResource}} is used in conjunction with > {{LastModifiedResourceVersion}}, it will concatenate its resources for every > request, even if unchanged. > The reason for this is, that {{LastModifiedResourceVersion#getVersion}} uses > only {{lastModified}} of the {{getResourceStream}} call to determine a > version. But {{getResourceStream}} of {{ConcatBundleResource}} collects (and > compresses) for that call already. > This effectively cancels out any time saved by using the class in the first > place. > It should only collect and build the actual content "on demand". -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (WICKET-6008) Wicket.Ajax.Call.handleMultipart should use channel
Dennis Waldherr created WICKET-6008: --- Summary: Wicket.Ajax.Call.handleMultipart should use channel Key: WICKET-6008 URL: https://issues.apache.org/jira/browse/WICKET-6008 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.5.13 Reporter: Dennis Waldherr When calling submitForm() it will delegate to handleMultipart(). It directly calls {code} form.submit(); {code} This will submit concurrently to the channel ajax requests. Although hard to reproduce, this can lead to submits being executed before an ajax request on the channel. The form could get submitted before "other" data was completely transmitted to the server. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (WICKET-6008) Wicket.Ajax.Call.handleMultipart should use channel
[ https://issues.apache.org/jira/browse/WICKET-6008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14966436#comment-14966436 ] Dennis Waldherr commented on WICKET-6008: - Note that is does actually call {{Wicket.ChannelManager.done()}} and might trigger execution of the next ajax call, although the old one is still running. > Wicket.Ajax.Call.handleMultipart should use channel > --- > > Key: WICKET-6008 > URL: https://issues.apache.org/jira/browse/WICKET-6008 > Project: Wicket > Issue Type: Bug > Components: wicket >Affects Versions: 1.5.13 >Reporter: Dennis Waldherr > > When calling submitForm() it will delegate to handleMultipart(). > It directly calls > {code} > form.submit(); > {code} > This will submit concurrently to the channel ajax requests. > Although hard to reproduce, this can lead to submits being executed before an > ajax request on the channel. The form could get submitted before "other" data > was completely transmitted to the server. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (WICKET-5714) MockHttpServletRequest.buildRequest() should work for parameters with multiple values with multipart content type
[ https://issues.apache.org/jira/browse/WICKET-5714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14160119#comment-14160119 ] Dennis Waldherr commented on WICKET-5714: - Hi, when is 1.5.13 going to be released? MockHttpServletRequest.buildRequest() should work for parameters with multiple values with multipart content type - Key: WICKET-5714 URL: https://issues.apache.org/jira/browse/WICKET-5714 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.5.11 Reporter: Dennis Waldherr Assignee: Martin Grigorov Fix For: 6.18.0, 1.5.13, 7.0.0-M4 The following code in the method MockHttpServletRequest.buildRequest() iterates over all values of a parameter. When writing the value to the outputstream it doesn't use the iteration variable, but instead retrieves the value with post.getParameterValue(parameterName) which always returns the first element of the list. {code} ListStringValue values = post.getParameterValues(parameterName); for (StringValue value : values) { newAttachment(out); out.write(; name=\.getBytes()); out.write(parameterName.getBytes()); out.write(\.getBytes()); out.write(crlf.getBytes()); out.write(crlf.getBytes()); out.write(post.getParameterValue(parameterName).toString().getBytes()); out.write(crlf.getBytes()); } {code} So for a given list of values 3, 2 and 1, it actually writes 3, 3 and 3. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (WICKET-5714) MockHttpServletRequest.buildRequest() should work for parameters with multiple values with multipart content type
Dennis Waldherr created WICKET-5714: --- Summary: MockHttpServletRequest.buildRequest() should work for parameters with multiple values with multipart content type Key: WICKET-5714 URL: https://issues.apache.org/jira/browse/WICKET-5714 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.5.11 Reporter: Dennis Waldherr The following code in the method MockHttpServletRequest.buildRequest() iterates over all values of a parameter. When writing the value to the outputstream it doesn't use the iteration variable, but instead retrieves the value with post.getParameterValue(parameterName) which always returns the first element of the list. {code} ListStringValue values = post.getParameterValues(parameterName); for (StringValue value : values) { newAttachment(out); out.write(; name=\.getBytes()); out.write(parameterName.getBytes()); out.write(\.getBytes()); out.write(crlf.getBytes()); out.write(crlf.getBytes()); out.write(post.getParameterValue(parameterName).toString().getBytes()); out.write(crlf.getBytes()); } {code} So for a given list of values 3, 2 and 1, it actually writes 3, 3 and 3. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (WICKET-5714) MockHttpServletRequest.buildRequest() should work for parameters with multiple values with multipart content type
[ https://issues.apache.org/jira/browse/WICKET-5714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14156609#comment-14156609 ] Dennis Waldherr commented on WICKET-5714: - Thanks, that was quick :) MockHttpServletRequest.buildRequest() should work for parameters with multiple values with multipart content type - Key: WICKET-5714 URL: https://issues.apache.org/jira/browse/WICKET-5714 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.5.11 Reporter: Dennis Waldherr Assignee: Martin Grigorov Fix For: 6.18.0, 1.5.13, 7.0.0-M4 The following code in the method MockHttpServletRequest.buildRequest() iterates over all values of a parameter. When writing the value to the outputstream it doesn't use the iteration variable, but instead retrieves the value with post.getParameterValue(parameterName) which always returns the first element of the list. {code} ListStringValue values = post.getParameterValues(parameterName); for (StringValue value : values) { newAttachment(out); out.write(; name=\.getBytes()); out.write(parameterName.getBytes()); out.write(\.getBytes()); out.write(crlf.getBytes()); out.write(crlf.getBytes()); out.write(post.getParameterValue(parameterName).toString().getBytes()); out.write(crlf.getBytes()); } {code} So for a given list of values 3, 2 and 1, it actually writes 3, 3 and 3. -- This message was sent by Atlassian JIRA (v6.3.4#6332)