Re: possible bug in HttpRecordingImplementation.java line 538?

Philip Aston <[email protected]> Sat, 19 Nov 2011 14:11:08 +0000
Newsgroups gmane.comp.java.grinder.devel
Message-ID <[email protected]>
No, the code is right.

The clause is saying "Start a new page if the request is not for a 
resource (image, js, css) and the last response was not a redirect." 
This keeps redirections within the same page.


Your suggestion is "Start a new page if the request is not for a 
resource or the last response was a redirect". You'd create a new page 
for each redirect, whether or not it was for a resource. I don't think 
this is correct.

- Phil



On 15/11/11 10:16, James Liang wrote:
>
> if (!request.getUri().getExtends().equals(lastBaseURI) ||
>
>                 request.isSetBody() ||
>
> ==>        
> !(m_resourcePathPattern.matcher(request.getUri().getUnparsed()).matches() 
> ||
>
>                  lastResponseWasRedirect) ||
>
>                 currentPage == null) {
>
>   currentPage = httpRecording.addNewPage();
>
> }
>
> Notice the ! () around both the resource path test and redirect test:
>
> !(m_resourcePathPattern.matcher(request.getUri().getUnparsed()).matches() 
> || lastResponseWasRedirect)
>
> Perhaps this should look like this?
>
> if (!request.getUri().getExtends().equals(lastBaseURI) ||
>
>                 request.isSetBody() ||
>
>                 
> !m_resourcePathPattern.matcher(request.getUri().getUnparsed()).matches() 
> ||
>
>                 lastResponseWasRedirect ||
>
>                 currentPage == null) {
>
>   currentPage = httpRecording.addNewPage();
>
> }
>
> James
>

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d

_______________________________________________
Grinder-development mailing list
Grinder-development-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/grinder-development