ASF Bugzilla – Attachment 20010 Details for
Bug 42185
If a HTTP Sampler follows a redirect, and is set up to download images, then images are downloaded multiple times
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Suggested patch
patch_for_42185.patch (text/plain), 2.39 KB, created by
Alf Hogemark
on 2007-04-22 05:30:42 UTC
(
hide
)
Description:
Suggested patch
Filename:
MIME Type:
Creator:
Alf Hogemark
Created:
2007-04-22 05:30:42 UTC
Size:
2.39 KB
patch
obsolete
>Index: C:/Documents and Settings/alf/workspace/Jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java >=================================================================== >--- C:/Documents and Settings/alf/workspace/Jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java (revision 531151) >+++ C:/Documents and Settings/alf/workspace/Jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java (working copy) >@@ -1114,6 +1114,7 @@ > * @return > */ > protected HTTPSampleResult resultProcessing(boolean areFollowingRedirect, int frameDepth, HTTPSampleResult res) { >+ boolean wasRedirected = false; > if (!areFollowingRedirect) { > if (res.isRedirect()) { > log.debug("Location set to - " + res.getRedirectLocation()); >@@ -1121,6 +1122,7 @@ > if (getFollowRedirects()) { > res = followRedirects(res, frameDepth); > areFollowingRedirect = true; >+ wasRedirected = true; > } > } > } >@@ -1131,7 +1133,12 @@ > // If we followed redirects, we already have a container: > HTTPSampleResult container = (HTTPSampleResult) (areFollowingRedirect ? res.getParent() : res); > >- res = downloadPageResources(res, container, frameDepth); >+ // Only download page resources if we were not redirected. >+ // If we were redirected, the page resources have already been >+ // downloaded for the sample made for the redirected url >+ if(!wasRedirected) { >+ res = downloadPageResources(res, container, frameDepth); >+ } > } > } > return res; >Index: C:/Documents and Settings/alf/workspace/Jmeter/src/core/org/apache/jmeter/resources/messages_no.properties >=================================================================== >--- C:/Documents and Settings/alf/workspace/Jmeter/src/core/org/apache/jmeter/resources/messages_no.properties (revision 531151) >+++ C:/Documents and Settings/alf/workspace/Jmeter/src/core/org/apache/jmeter/resources/messages_no.properties (working copy) >@@ -45,7 +45,7 @@ > file_visualizer_submit_data=Inkluder sendte data > file_visualizer_title=Filrapport\u00F8r > file_visualizer_verbose=Utf\u00F8rlig output >-follow_redirects=Follow redirects [TO-DO] >+follow_redirects=Follow redirects > ftp_sample_title=FTP foresp\u00F8rsel standard instillinger > ftp_testing_title=FTP foresp\u00F8rsel > gaussian_timer_delay=Konstant forsinkelsesoffset (i millisekund)\:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 42185
:
20009
| 20010