jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: HTTP POST to a redirected URL handled properly?
Date Sun, 12 Aug 2012 09:57:43 GMT
On 11 August 2012 19:08, Deepak Shetty <shettyd@gmail.com> wrote:
> Hi
> I think you are referring to a status code of 307 - Since almost all web
> apps use 302 as the status code , I believe everything is converted into a
> GET normally (though supposedly this contradicts what was meant to be
> implemented)
>
> http://en.wikipedia.org/wiki/HTTP_307#3xx_Redirection

AFAICT Wikipedia disagrees with the RFC here.

https://tools.ietf.org/html/rfc2616#section-10.3.8

Wikipedia says that 307 redirects should preserve the method; RFC 2616
says specifically that only HEAD and GET should be automatically
re-issued.

> regards
> deepak
>
> On Aug 11, 2012 4:23 AM, "sebb" <sebbaz@gmail.com> wrote:
>
>> On 11 August 2012 00:03, Deepak Shetty <shettyd@gmail.com> wrote:
>> >> If not, is this the correct user agent and test tool behavior to expect
>> > when coming across a 302 redirect for POST requests?
>> > Yes a  redirect is always a GET
>>
>> AIUI if a POST is redirected, the client is supposed to prompt the
>> user to get agreement that the redirect is OK.
>>
>> Only GET requests can be automatically redirected.
>>
>> You'll need to change the test plan to use the redirect URL instead.
>>
>> > regards
>> > deepak
>> >
>> > On Fri, Aug 10, 2012 at 3:56 PM, David Luu <mangaroo@gmail.com> wrote:
>> >
>> >> Hi,
>> >>
>> >> This is first time I've come across this topic. By the way, I'm testing
>> >> APIs that are under development so things might change, will follow up
>> on
>> >> them later but assuming correct server setup:
>> >>
>> >> I make POST to a URL and it returned 302 moved temporarily with new URL.
>> >> The redirect is basically changing original URL of HTTP to HTTPS, that's
>> >> it. In JMeter, I'm using an HTTP sampler and by default have the follow
>> >> redirect option checked. It did follow the redirect but POST request
>> became
>> >> a GET and thus all POST data was lost and API call failed. I didn't
>> specify
>> >> a specific HTTP client to use, using system default. If it matters,
>> which
>> >> HTTP client is best suited for this? I was wondering whether under this
>> >> situation JMeter can follow redirect but keep as POST request with same
>> >> posted data? If so, how? If not, is this the correct user agent and test
>> >> tool behavior to expect when coming across a 302 redirect for POST
>> >> requests?
>> >>
>> >> Regards,
>> >> David
>> >>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>> For additional commands, e-mail: user-help@jmeter.apache.org
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Mime
View raw message