https://issues.apache.org/bugzilla/show_bug.cgi?id=56197

            Bug ID: 56197
           Summary: HTTP Request Component fails to Send File with the
                    Request
           Product: JMeter
           Version: 2.11
          Hardware: Macintosh
            Status: NEW
          Severity: major
          Priority: P2
         Component: HTTP
          Assignee: [email protected]
          Reporter: [email protected]

I am trying to send a file as the body of a POST request, so the Parameters and
Body Data are both empty, as is the Parameter Name and Mime Type of the file.

There are several related bugs here that cause this to fail.

1) The File Path does not properly expand the '~' character to be relative to
the .jmx file.  Also, a relative path does not work either.  For example, if
you have a file named 'test.txt' next to your project.jmx file, neither of
these File paths will reach it:
~/test.txt
text.txt
~text.txt

An absolute path works, but that is just about useless in most environments.

2) The file will not be sent if the UI is on the 'Body Data' tab, even if this
tab has no content.  Simply switching to the Parameters tab causes the file to
be included.

3) If the file is included in the body of the POST, user parameters, eg
${myVarName}, are not replaced before the content is sent in the body.  This is
unexpected b/c these variables are replaced if you put them in the Body Data
tab.

As a final note, the handling of '~' as being relative to the .jmx file is
inconsistent across components.  The docs say this should work, but it doesn't
work for this component or for the CSV Data Set Config component (I know, its
another bug...)

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to