You could build two different samplers and extract the redirect from the header 
if the address is dynamic.

> -----Original Message-----
> From: David Luu [mailto:[email protected]]
> Sent: Monday, November 19, 2012 4:27 PM
> To: JMeter Users List
> Subject: Re: How to force the port to be used in an HTTP Sampler?
> 
> It's not totally clear from the original email, but I'm assuming the
> sampler was originally requesting an HTTP url on port 80 (specified
> specifically in port field or left at default).
> 
> And the result of the request causes a redirect to HTTPS with specific
> addition of port 443 in URL, and that the HTTP sampler simply follows the
> redirect to HTTPS at given URL but doesn't append port 443, causing the
> failure.
> 
> If you manually set port to 443 in the port field for the sampler, wouldn't
> that cause the original request to change from
> 
> http://originalUrl
> 
> to
> 
> http://originalUrl:443
> 
> which could then cause a problem w/o redirecting, because server is
> expecting port 80 instead at this point of the process? But of course, if
> the original URL was already HTTPS and on 443 (default) then that wouldn't
> be a problem.
> 
> On Mon, Nov 19, 2012 at 11:11 AM, sebb <[email protected]> wrote:
> 
> > On 19 November 2012 18:18, Taoism <[email protected]> wrote:
> > > Hi all,
> > >
> > > I am having an issue with a SSO system.
> > >
> > > If I do a recording following redirects at one point the system sends a
> > > response headers with a redirect URL like so:
> > >
> > > https://domain:443/blah/SSO?qsStuff
> > >
> > > (Note the use of both https and the default 443 port in the URL).
> > >
> > > The HTTP Sampler will not add the 443 to the URL being sent to the next
> > > server (personally I don't think it should have to).  If the port is
> > omitted
> > > and just https://domain/blah is used I get an Internal error from the
> > > server.  Adding the port allows the SSO process to continue. (Discovered
> > by
> > > manually copying the response redirect and pasting into a browser).
> > >
> > > Is there any way to force the HTTP Sampler to include the port when it
> > makes
> > > the request even though it is technically redundant in this instance?
> >
> > Just provide the port on the sampler GUI.
> >
> > > Cheers!
> > >
> > >
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > http://jmeter.512774.n5.nabble.com/How-to-force-the-port-to-be-used-
> in-an-HTTP-Sampler-tp5715344.html
> > > Sent from the JMeter - User mailing list archive at Nabble.com.
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [email protected]
> > > For additional commands, e-mail: [email protected]
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to