jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepak Shetty <shet...@gmail.com>
Subject Re: rewrite absolute URLs containing '/../'?
Date Wed, 07 Apr 2010 17:49:17 GMT
Hi
I meant you can add code to Jmeter.

If this is only happening for a page or for a few pages , you can write some
simple java/javascript code to fix the url.
Change JMeter to uncheck both follow redirect and redirect automatically,
check if returned status code is a redirect one, extract out the location
header and fix it using the code above (perhaps via a beanshell or
javascript function).
If you need to do this for all or most URL's then its tedious, though you
might be able to reduce the grunt work by using module controllers /
generating the scripts.


regards
deepak

On Wed, Apr 7, 2010 at 10:31 AM, Nikita Tovstoles <
nikita.tovstoles@gmail.com> wrote:

> Unf. it's not my code, and changing it appears to be non-trivial.
> We're using wicket which does relative 302 redirects on all initial
> page requests. Suppose you've an app deployed at:
>
> http://localhost/app/
>
> and a particular page at http://localhost/app/page/
>
> 1) First request to:
> http://localhost/app/page/
>
> 2) will result in 302 with Location:
> http://localhost/app/page/ . . /page.0  (spaces added to avoid spam
> filter)
>
> 3) All major browsers (including IE6 and wget) will then issue a GET for:
> http://localhost/app/page.0
>
> but JMeter issues a GET for 2) as is. And that results in a 404.
>
>
> There's been a discussion on this before:
> http://www.mail-archive.com/jmeter-user@jakarta.apache.org/msg28360.html
>
> and several JIRAs filed:
> https://issues.apache.org/jira/browse/WICKET-2728
>
> but, as I am sure you understand, we poor app developers, need to
> load-test our stuff one way or another at the end of the day. I am not
> clear (yet) whether:
> -wicket returns the URL in 2) as you see it (in which case the fix
> w/in wicket framework may indeed be easy) OR
> -wicket redirects to . . /page.0 and it's either Tomcat or the client
> that interprets it as what one sees in 2) (in which case the fix is
> indeed easier in JMeter).
>
>
> Hope the above explains my motivation
>
>
>
>
>
>
> On Wed, Apr 7, 2010 at 10:01 AM, Deepak Shetty <shettyd@gmail.com> wrote:
> > Jmeter fetches URL's that you ask to fetch (so you can format them any
> which
> > way you want), so where are you seeing this problem? in redirects (you
> can
> > deal with this by writing a little code instead of needing to change
> Jmeter
> > code)?
> > Jmeter Code should be in
> > org.apache.jmeter.protocol.http.sampler.HTTPSampler/2  (not verified)
> >
> >
> > regards
> > deepak
> >
> >
> > On Wed, Apr 7, 2010 at 9:47 AM, Nikita Tovstoles <
> nikita.tovstoles@gmail.com
> >> wrote:
> >
> >> Hello,
> >>
> >> I need JMeter to rewrite absolute URLs containing '/../'  For example,
> >> major
> >> browsers & wget, given:
> >>
> >> http://www.google.com/products/ . . / products
> >> (spaces added to avoid SPAM filtering)
> >>
> >> will actually send HTTP GET for
> >>
> >> http://www.google.com/products/
> >>
> >> JMeter 2.3.4 appears to send the initial URL verbatim, which results in
> a
> >> 404 if pointed against a vanilla Tomcat.
> >>
> >> We're using Wicket and URLs similar to the above are very common (Wicket
> >> issues redirects like the above). I saw discussions from a couple of
> months
> >> ago wrt whose responsibility it is to normalize the URL and read the
> RFC. I
> >> understand positions on either side, but, unfortunately, do really need
> to
> >> load test our app asap ;-
> >>
> >> So, I am happy to fork JMeter locally, if needed. If the above indeed
> >> requires a code change in JMeter (or HttpClient?) could someone please
> >> respond with a hint as to where specifically I should look in src?
> >>
> >> thanks
> >>
> >> -nikita
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message