Return-Path: X-Original-To: apmail-jmeter-user-archive@www.apache.org Delivered-To: apmail-jmeter-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1CEECD791 for ; Sun, 12 Aug 2012 09:58:18 +0000 (UTC) Received: (qmail 66761 invoked by uid 500); 12 Aug 2012 09:58:17 -0000 Delivered-To: apmail-jmeter-user-archive@jmeter.apache.org Received: (qmail 66179 invoked by uid 500); 12 Aug 2012 09:58:12 -0000 Mailing-List: contact user-help@jmeter.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "JMeter Users List" Delivered-To: mailing list user@jmeter.apache.org Received: (qmail 66128 invoked by uid 99); 12 Aug 2012 09:58:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Aug 2012 09:58:10 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sebbaz@gmail.com designates 209.85.220.171 as permitted sender) Received: from [209.85.220.171] (HELO mail-vc0-f171.google.com) (209.85.220.171) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Aug 2012 09:58:04 +0000 Received: by vcdd16 with SMTP id d16so2950683vcd.2 for ; Sun, 12 Aug 2012 02:57:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=GX/6bbRmQVTUNrrFaPhv2WV4nb19a+gW5Xa6UJh+wbI=; b=tUkOEcJu0dkVA6UAE9X1HnriMDjPAavseSbmisDnO5DoQQEMnS+WV42/m+8sTtGVmQ v9JbbHk/WnAMXnuNEkS/dUig2nmfOvOxURtLBAIkg2N0QH4a/ASiT8plCImol8ZgBttR LaJQo+9WW1c1nMD/AwLhVoh+6WRhFjAaJWkfIFvKhJ4GfzY6/O9szK765WvyRfh5vDwo H5zZO9kcROMf2lxtTdBEBjxpywbNDUn+y6Qv4MktzcgeJfd5H2C7BZnJZySAAWq5OfZX l4SHk/9NcMOTz/u6LifWpbLwN9wASwl3/irLcqdSb9AechzSAyxRnRgvsyet93sZykEg GADQ== MIME-Version: 1.0 Received: by 10.220.153.200 with SMTP id l8mr6295030vcw.40.1344765463680; Sun, 12 Aug 2012 02:57:43 -0700 (PDT) Received: by 10.58.29.111 with HTTP; Sun, 12 Aug 2012 02:57:43 -0700 (PDT) In-Reply-To: References: Date: Sun, 12 Aug 2012 10:57:43 +0100 Message-ID: Subject: Re: HTTP POST to a redirected URL handled properly? From: sebb To: JMeter Users List Content-Type: text/plain; charset=ISO-8859-1 On 11 August 2012 19:08, Deepak Shetty 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" wrote: > >> On 11 August 2012 00:03, Deepak Shetty 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 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