Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 90511200B8E for ; Mon, 26 Sep 2016 09:13:43 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8ED2D160AC8; Mon, 26 Sep 2016 07:13:43 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CCD3F160AB8 for ; Mon, 26 Sep 2016 09:13:42 +0200 (CEST) Received: (qmail 43493 invoked by uid 500); 26 Sep 2016 07:13:41 -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 43482 invoked by uid 99); 26 Sep 2016 07:13:41 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Sep 2016 07:13:41 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 396951A046E for ; Mon, 26 Sep 2016 07:13:41 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.28 X-Spam-Level: * X-Spam-Status: No, score=1.28 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=raisin-com.20150623.gappssmtp.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id CbItNS6C10xK for ; Mon, 26 Sep 2016 07:13:38 +0000 (UTC) Received: from mail-yb0-f179.google.com (mail-yb0-f179.google.com [209.85.213.179]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 3421D5FBD4 for ; Mon, 26 Sep 2016 07:13:38 +0000 (UTC) Received: by mail-yb0-f179.google.com with SMTP id x93so87902707ybh.1 for ; Mon, 26 Sep 2016 00:13:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raisin-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=TLZFSBc+ZMsK+zXk6X7kGq4tuSuS342kVPwcczzD1So=; b=TyOT5SWf41ZOZcGxGonq+CySBEGGgihA3q0YW7ZBlEScJCAn+t1qCjbj3VF37u7AXV YEn3XykIkESUvKjkVZrb6mpSEBZ6xxn4tSIeV3TqID2WxkRMZ8C3xz8KHh9TnLiwRd65 UIWRRkydmeLBrD/+BxajISZWx07kxkoPUqBh19xPsZTKBoFGPSbd/hqLqtySiJ/vaPLr J/Q7lAO0fY62i2lqDisbt1USxnJLYYt0HK4QkJwJUBTEsCZOcD3L0JHk2cZp6d3pdSyf pGsciMMtNYfxM66VOqZ6BSesRZPq+K8cH5XkNeL3w7g0wDDxDfYje7f+KC+7ozNYvI/u j2xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=TLZFSBc+ZMsK+zXk6X7kGq4tuSuS342kVPwcczzD1So=; b=EfiZXtCbPTIDYI82RKPwa+5eekBVCLDJ4eGSSj+1kLSr5lwuF51Dxaeozq0xjp8B3g pz2gbQ5ixLQTO+mp9CAFcQ2mM3/1oxOKwEPM2Nlc++okrDAI+gY638ux7uJeZ7a9ZmMm OhudE/YvcHcGXotHCrxCxn4dQwweGjvtpfUEDkE/AcT1vHLBMvmoRd0D969k/2Fl4JID 8yu95AkQOdSKJnOQfY9VzeyLh5KsGhRHA6vtrQEXVgUjfE4iZ8g8KyNtnadzR/ftrSij 7lgwg79Lm6++IdvMdVAGx3/ayJqrFlaFiZM7RQqrF9mVksQRcPBAk3CyJx8F6CP7TbmQ 31Fg== X-Gm-Message-State: AE9vXwPj6fkwZTjvN+e2muXkRwRaq+LL7svRQ0KWCxpdGMZjpWQtHLNDKTulhUJJo0b2Dq+/Dju0LfjK8TEi3g3r X-Received: by 10.37.80.17 with SMTP id e17mr15700563ybb.105.1474874011049; Mon, 26 Sep 2016 00:13:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.174.9 with HTTP; Mon, 26 Sep 2016 00:13:10 -0700 (PDT) From: Tarun Kumar Bhadauria Date: Mon, 26 Sep 2016 09:13:10 +0200 Message-ID: Subject: Re: File upload results in 400 error To: JMeter Users List Content-Type: multipart/alternative; boundary=001a113eac7c849091053d63dde0 archived-at: Mon, 26 Sep 2016 07:13:43 -0000 --001a113eac7c849091053d63dde0 Content-Type: text/plain; charset=UTF-8 I found that using HTTP Request Implementation - HTTPClient4 was causing the error 400. I changed it to java and error disappeared. On 24 September 2016 at 04:21, Deepak Shetty wrote: > run curl with -v and compare (visually , not sure if the Authorization > header is case senstive) > > On Tue, Sep 20, 2016 at 1:51 AM, Tarun Kumar Bhadauria < > tarun.kumar.bhadauria@raisin.com> wrote: > > > Hello All, > > > > I am trying to convert following curl request to JMeter call - > > > > curl -X POST --header 'Content-Type: multipart/form-data' --header > 'Accept: > > application/json' --header 'Authorization: Bearer ' -F > > upload_file=@"test.pdf" 'https://xxx' > > > > And this is how JMeter request looks as - > > > > http://i.stack.imgur.com/c9X1U.png > > > > And this is what I get from Request tab of View Results in Tree - > > > > *POST https://xxx * > > *POST data:* > > *--ZRdmcvkfYjxrM3FEDal6NGOFIdjm1F0* > > *Content-Disposition: form-data; name="upload_file"; filename="test.pdf"* > > *Content-Type: multipart/form-data* > > > > ** > > *--ZRdmcvkfYjxrM3FEDal6NGOFIdjm1F0--* > > > > > > *[no cookies]* > > > > *Request Headers:* > > *Connection: keep-alive* > > *Content-Type: multipart/form-data* > > *Accept-Language: en-US* > > *Authorization: bearer * > > *Accept: application/json* > > *Content-Length: 79104* > > *Host: * > > *User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_102)* > > > > > > But the I get 400 status code as result of call. Given that curl work, > what > > do I do wrong with JMeter request? > > > > Thanks > > Tarun K > > > --001a113eac7c849091053d63dde0--