And i dont believe ( might be na�ve on this since i didnt look really deep
in the code) that could be hard to implement:

- Add a String attribute named referer to the HTTP request entity
- Have the proxy server set this attribute when it creates HTTP request
entity (as an option may be ? )
- Have the engine which makes request use this attibutes if it set


----- Original Message -----
From: "Christian Meunier" <[EMAIL PROTECTED]>
To: "JMeter Developers List" <[EMAIL PROTECTED]>
Sent: Friday, March 29, 2002 6:04 PM
Subject: Re: HTTP request and referer


> > Ok, but "referer" is an HTTP header.  You could specify what the
"referer"
> > is for each JMeter request.  Granted, this would be a pain,
>
> Ya the idea is to have the proxy server set this automatically, manually
set
> referer for each HTTP request is useless i am agree with you on that ;)
>
>
> ----- Original Message -----
> From: "Stover, Michael" <[EMAIL PROTECTED]>
> To: "'JMeter Developers List'" <[EMAIL PROTECTED]>
> Sent: Friday, March 29, 2002 5:59 PM
> Subject: RE: HTTP request and referer
>
>
> > Ok, but "referer" is an HTTP header.  You could specify what the
"referer"
> > is for each JMeter request.  Granted, this would be a pain, and what you
> > really want is for JMeter to dynamically change the "referer" parameter
> for
> > each request based on the previous request.  I'm just trying to figure
out
> > how JMeter could be enhanced to really help you.
> >
> > This sounds like a good candidate for a new Response Based Modifier.
Are
> > you a programmer?  You could probably make one, or add it as an
> enhancement
> > request to the jakarta bug database.
> >
> > -Mike
> >
> > > -----Original Message-----
> > > From: Christian Meunier [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, March 29, 2002 11:50 AM
> > > To: JMeter Developers List
> > > Subject: Re: HTTP request and referer
> > >
> > >
> > > > What is it that a normal browser is doing, that JMeter does not?
> > >
> > > a normal browser is able to set a specific referer for each request
> > >
> > >
> > >
> > > Have a look at this simple test case:
> > >
> > > /page1.html
> > > /compute.jsp
> > >
> > >
> > > page1.html code:
> > > -----------------------------------
> > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> > > <html>
> > > <head>
> > >  <title>Test case</title>
> > > </head>
> > >
> > > <body>
> > >
> > > <script type="text/javascript" src="compute.jsp"></script>
> > >
> > > [LOCAL]&nbsp;&nbsp;The query string used in this html page is:&nbsp;
> > > <script type="text/javascript">
> > >  var loc = ""+document.location;
> > >  var queryString="";
> > >  if(loc.indexOf('?')!=-1)
> > >   queryString=loc.substring(loc.indexOf('?'));
> > >  document.write(queryString);
> > > </script>
> > > <br>
> > > [SERVER]&nbsp;The query string used in this html page is:&nbsp;
> > > <script type="text/javascript">
> > >  document.write(test);
> > > </script>
> > >
> > > <p>Both [LOCAL] and [SERVER] query string should be the same</p>
> > >
> > > </body>
> > > </html>
> > >
> > > -------------------------------------
> > >
> > > compute.jsp code:
> > > -------------------------------------
> > > <%
> > >  String queryString="";
> > >  try
> > >  {
> > >   queryString =
> > > request.getHeader("Referer").substring(request.getHeader("Refe
> > > rer").indexOf(
> > > "?"));
> > >  }
> > >  catch(Exception e)
> > >  {
> > >   //do nothing
> > >  }
> > >  out.print("var test='"+queryString+"';");
> > > %>
> > > -----------------------------------------
> > >
> > >
> > > Now let's say that compute.jsp will call some business method
> > > that take some
> > > parameters i found in the querystring of the html page which invoked
> > > compute.jsp. If the referer is null or the querystring with
> > > the referer
> > > could not be found, an exception is thrown.
> > >
> > > At the moment, JMeter is not able to test such framework and
> > > there are many
> > > websites which use JSP to factory some javascript and in many
> > > cases, the
> > > output of the factory is tied with the referer and with the
> > > querystring that
> > > can be found in that referer.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: "Stover, Michael" <[EMAIL PROTECTED]>
> > > To: "'JMeter Developers List'" <[EMAIL PROTECTED]>
> > > Sent: Friday, March 29, 2002 4:31 PM
> > > Subject: RE: HTTP request and referer
> > >
> > >
> > > > I guess I don't understand.  "Referer" is an HTTP header,
> > > no?  I don't
> > > know
> > > > what "<script.../>" is, but it looks like you need to parse
> > > response pages
> > > > and then generate additional requests based on parsing the
> > > <script> tags?
> > > >
> > > > What is it that a normal browser is doing, that JMeter does not?
> > > >
> > > > -Mike
> > > >
> > > > > -----Original Message-----
> > > > > From: Christian Meunier [mailto:[EMAIL PROTECTED]]
> > > > > Sent: Friday, March 29, 2002 10:28 AM
> > > > > To: JMeter Developers List
> > > > > Subject: Re: HTTP request and referer
> > > > >
> > > > >
> > > > > Unfortunatly the HTTP Header Manager is not  a valid solution
> > > > > because it
> > > > > does not allow to propagate the querystring that was used in
> > > > > the referer.
> > > > > Consider this example:
> > > > >
> > > > >
> > > > > display_forum.html?num=1
> > > > > -----------------------------------
> > > > > <some html tags>
> > > > > <script src="/get_forum_thread.jsp"></script>
> > > > > ----------------------------------------
> > > > >
> > > > > As you can see, the engine need to know which exact referer
> > > > > (the url AND the
> > > > > querystring) was used to compute the requested information,
> > > > > ( it means that
> > > > > with the referer the engine is able to determine the
> > > > > querystring that was
> > > > > used with the html page)
> > > > >
> > > > > You cant achieve that with an HTTP Header Manager.
> > > > >
> > > > >
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "Stover, Michael" <[EMAIL PROTECTED]>
> > > > > To: "'JMeter Developers List'" <[EMAIL PROTECTED]>
> > > > > Sent: Friday, March 29, 2002 4:11 PM
> > > > > Subject: RE: HTTP request and referer
> > > > >
> > > > >
> > > > > > So, you need to specify custom headers in your JMeter
> > > > > scripts.  This can
> > > > > be
> > > > > > done with the Header Manager.
> > > > > >
> > > > > > The proxy server, currently, doesn't transmit/save header
> > > > > information.
> > > > > > However, it could be modified to do so.  Is that what you'd
> > > > > like to do?
> > > > > >
> > > > > > -Mike
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Christian Meunier [mailto:[EMAIL PROTECTED]]
> > > > > > > Sent: Friday, March 29, 2002 10:09 AM
> > > > > > > To: JMeter Developers List
> > > > > > > Subject: Re: HTTP request and referer
> > > > > > >
> > > > > > >
> > > > > > > Thanks for your answer Mike,
> > > > > > >
> > > > > > > You can find a "clear" picture of my framework by
> > > > > > > http://www.magelo.com/overview.html
> > > > > > >
> > > > > > > The engine is using the html referer to determine which
> > > > > > > comunity made the
> > > > > > > call and therefore deliver a custom response for this
> > > community.
> > > > > > >
> > > > > > > A simple example:
> > > > > > >
> > > > > > > index.html
> > > > > > > ---------------------------------
> > > > > > > <html>
> > > > > > > <body>
> > > > > > > <script
> > > > > > >
> > > > >
> > > src='http://www.magelo.com/components/get_website_info.jsp'></script>
> > > > > > >
> > > > > > > <script>document.write(website_name);</script>
> > > > > > >
> > > > > > > </body>
> > > > > > > </html
> > > > > > > ---------------------------------
> > > > > > >
> > > > > > >
> > > > > > > if the index.html is hosted on http://nightwatchers.dpn.ch
> > > > > > > then when the
> > > > > > > browser call the Javascript ressource, the Magelo engine
> > > > > looks at the
> > > > > > > referer, find http://nightwatchers.dpn.ch/index.html ,
> > > > > since it's a
> > > > > > > registered community, it will deliver the required
> > > > > > > information for this
> > > > > > > community.
> > > > > > >
> > > > > > > Therefore the website_name will be equal to Nightwatchers.
> > > > > > >
> > > > > > > At the moment, the HTTP Request "object" in JMeter is not
> > > > > > > aware of a referer
> > > > > > > attribute, the idea is to add this attribute and when the
> > > > > request is
> > > > > > > made,include the referer in the header.
> > > > > > >
> > > > > > > Then we can modify the Http proxy "recorder" to set the
> > > > > > > referer when it
> > > > > > > "records" HTTP Request
> > > > > > >
> > > > > > > Best regards
> > > > > > > Christian Meunier
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ----- Original Message -----
> > > > > > > From: "Stover, Michael" <[EMAIL PROTECTED]>
> > > > > > > To: "'JMeter Developers List'" <[EMAIL PROTECTED]>
> > > > > > > Sent: Friday, March 29, 2002 3:37 PM
> > > > > > > Subject: RE: HTTP request and referer
> > > > > > >
> > > > > > >
> > > > > > > > I'm not sure exactly what you mean by "referrer" in this
> > > > > > > sense.  Probably
> > > > > > > > JMeter doesn't support it, and I don't know of anyone
> > > > > > > working on it.  I'd
> > > > > > > be
> > > > > > > > very interested in understanding more what you mean, and in
> > > > > > > helping you
> > > > > > > find
> > > > > > > > the code that would need to be modified/extended to do it.
> > > > > > > >
> > > > > > > > -Mike
> > > > > > > >
> > > > > > > > > -----Original Message-----
> > > > > > > > > From: Christian Meunier [mailto:[EMAIL PROTECTED]]
> > > > > > > > > Sent: Thursday, March 28, 2002 9:34 PM
> > > > > > > > > To: [EMAIL PROTECTED]
> > > > > > > > > Subject: HTTP request and referer
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Hi, my web application have an heavy usage of referers.
> > > > > > > > > Inside an html page i call some JSP to tailor
> > > some javascript
> > > > > > > > > data upon referers using:
> > > > > > > > > <script src='/get_info.jsp'></script>
> > > > > > > > >
> > > > > > > > > I am unable to test my framework with Jmeter
> > > because it does
> > > > > > > > > not handle referer to my knowledge.
> > > > > > > > > I would like to know if someone is working on
> > > this before i
> > > > > > > > > start to dig in the code.
> > > > > > > > >
> > > > > > > > > I believe it shouldnt be hard to enhance the HttpRequest
> > > > > > > > > class with a referer attribute and let the proxy
> > > server set
> > > > > > > > > it (or the user via the gui).
> > > > > > > > >
> > > > > > > > > What do you think of this ?
> > > > > > > > > Thanks in advance.
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > To unsubscribe, e-mail:
> > > > > > > <mailto:[EMAIL PROTECTED]>
> > > > > > > > For additional commands, e-mail:
> > > > > > > <mailto:[EMAIL PROTECTED]>
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > To unsubscribe, e-mail:
> > > > > > > <mailto:[EMAIL PROTECTED]>
> > > > > > > For additional commands, e-mail:
> > > > > > > <mailto:[EMAIL PROTECTED]>
> > > > > > >
> > > > > >
> > > > > > --
> > > > > > To unsubscribe, e-mail:
> > > > > <mailto:[EMAIL PROTECTED]>
> > > > > > For additional commands, e-mail:
> > > > > <mailto:[EMAIL PROTECTED]>
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > To unsubscribe, e-mail:
> > > > > <mailto:[EMAIL PROTECTED]>
> > > > > For additional commands, e-mail:
> > > > > <mailto:[EMAIL PROTECTED]>
> > > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > > For additional commands, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to