You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by "Stover, Michael" <Mi...@usa.xerox.com> on 2002/06/18 19:51:05 UTC
RE: Patch to support disabling following redirects -- please appl y
soon
After fixing this, I made a new unit test that reveals the flaw (well,
would have revealed the flaw).
I keep trying to learn to make unit tests and then fix the flaw like you're
supposed to, but I still haven't learned to work like that.
-Mke
> -----Original Message-----
> From: Jordi Salvat i Alabart [mailto:jsalvata@atg.com]
> Sent: Tuesday, June 18, 2002 12:59 AM
> To: JMeter Developers List
> Subject: Re: Patch to support disabling following redirects -- please
> apply soon
>
>
> Well... they were not THAT straightforward. I also broke the
> saving/loading of UrlConfigs and HTTPSamplers... I should
> have found the
> problem by running the tests I stated... so it looks like I made some
> mistake running the tests. I hadn't guessed that
> saving/retrieving test
> elements only support Strings, not other types such as Booleans.
>
> Anyway, the attached patch corrects this (I've been very
> careful not to
> screw the tests again this time) -- that's the reason for the "please
> apply soon".
>
> It also contains the fix for the proxy problem that was the
> reason for
> all this changes. It turned out to be exactly the same
> initialization of
> the followRedirects you mentioned, only that it needs to be set to
> "false" instead of "true" -- also I've moved it slightly
> because I think
> it's cleaner, but of course that's a matter of taste. I've
> tested it and
> works very well.
>
> Salut,
>
> Jordi.
>
> Mike Stover wrote:
> > Yes, it would be better to communicate in email rather than in the
> code. I'll prune the
> > comments soon.
> >
> > I did modify the proxy slightly to initialize the FOLLOW_REDIRECT
> value. As it was, it was
> > causing a null pointer because that value wasn't being
> set. It was a
> simple change, and
> > everything seemed to work great after that. So far, your changes
> looked completely
> > straightforward.
> >
> > -Mike
> >
> > On 18 Jun 2002 at 4:03, Jordi Salvat i Alabart wrote:
> >
> >
> >>Seen it. So quick!
> >
> >
> > Well, consider yourself lucky - usually I'm slow as molasses to
> incorporate other people's
> > changes - just ask!
> >
> >
> >>Yes, I tried to change as little as possible to start
> with... I didn't
> >>want to screw up in my first contribution to the project :-)
> >>
> >>I still have to make the changes in the proxy -- this was only some
> >>pre-requisite work for it. It may be useful on its own, though.
> >>
> >>Seen your answers to my comments. I absolutely agree. Maybe we can
> >>remove some of them now... we don't want the whole CVS &
> bug history
> >>intermingled with the code, do we? We should leave those
> which explain
> >>or comment on code weirdnesses, since they may be useful to future
> >>developers.
> >>
> >>Salut,
> >>
> >>Jordi.
> >>
> >>Mike Stover wrote:
> >>
> >>>I've committed the changes. I notice that there is
> essentially no
> change yet to the way it works
> >>>- I assume you have further changes to make?
> >>>
> >>>I also made some notes by your comments, to answer some of your
> questions.
> >>>
> >>>-Mike
> >>>
> >>>On 18 Jun 2002 at 1:14, Jordi Salvat i Alabart wrote:
> >>>
> >>>
> >>>
> >>>>Hi.
> >>>>
> >>>>This is the first step of the work I was talking about:
> the changes
> >>>>necessary to support sampling without redirects.
> >>>>
> >>>>Can someone please have a look at it and, if deemed
> appropriate, put it
> >>>>into CVS?
> >>>>
> >>>>You'll see some comments marked [Jordi ...] [/Jordi]
> which I added to
> >>>>help myself resist the temptation of touching too much.
> Feel free to
> >>>>remove them if you find them disgusting.
> >>>>
> >>>>Other than the changes in the HTTPSampler.java (which
> have turned
> out to
> >>>>be pretty trivial), and a few changes in comments, I've
> added a "Follow
> >>>>Redirects" checkbox just right of the "Path:" field
> because, in a way,
> >>>>this flag alters the meaning of the path (since you'll
> actually end up
> >>>>loading the redirection target path rather than this one).
> >>>>
> >>>>One problem I see is that the field doesn't have any
> sense in the "HTTP
> >>>>Request Defaults" configuration panel. But as I think
> about it, neither
> >>>>do the Protocol and Method fields. Maybe it's time to
> separate the gui
> >>>>for the config elements and the samplers?
> >>>>
> >>>>I've added the "Follow Redirects" text to all three
> resource files,
> >>>>marking the Japanese and Norwegian ones as "TO-DO",
> because I don't
> know
> >>>>those languages.
> >>>>
> >>>>Tests I've run:
> >>>>
> >>>>- Created a test script which actually does a redirect
> with the old
> >>>>version. Loaded it in the new one and checked its
> behaviour hasn't
> changed.
> >>>>
> >>>>- Created a new test script with two equal requests,
> with and without
> >>>>redirects, and checked it behaves as expected.
> >>>>
> >>>>- Saved that test script to disk, stopped and restarted
> jmeter, started
> >>>>the test script again and checked it behaves just as before.
> >>>>
> >>>>All comments welcome.
> >>>>
> >>>>Salut,
> >>>>
> >>>>Jordi.
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>>
> >>>--
> >>>Michael Stover
> >>>mstover1@apache.org
> >>>Yahoo IM: mstover_ya
> >>>ICQ: 152975688
> >>>
> >>>--
> >>>To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> >>>For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >>>
> >>>
> >>
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> >>For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >>
> >
> >
> >
> > --
> > Michael Stover
> > mstover1@apache.org
> > Yahoo IM: mstover_ya
> > ICQ: 152975688
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> >
>
>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Patch to support disabling following redirects -- please appl
y soon
Posted by Jordi Salvat i Alabart <js...@atg.com>.
Stover, Michael wrote:
> After fixing this, I made a new unit test that reveals the flaw (well,
> would have revealed the flaw).
>
> I keep trying to learn to make unit tests and then fix the flaw like you're
> supposed to, but I still haven't learned to work like that.
>
> -Mke
>
I know what you mean.. I have the same problem.
Salut,
Jordi.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>