Bug 41880 - Add content-type filtering to HTTP Proxy Server
Summary: Add content-type filtering to HTTP Proxy Server
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.2
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-18 02:15 UTC by Alf Hogemark
Modified: 2007-03-18 16:38 UTC (History)
0 users



Attachments
Suggested patch (23.23 KB, patch)
2007-03-18 02:32 UTC, Alf Hogemark
Details | Diff
Suggested patch with unit test (4.95 KB, patch)
2007-03-18 03:15 UTC, Alf Hogemark
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alf Hogemark 2007-03-18 02:15:48 UTC
Add include and exclude filters for content-type, to control what gets added to
the test plan.

Also, restructure the GUI slightly, to make it easier to understand.
I propose to use some vertical panels, with title strings, to group related items.
Comment 1 Alf Hogemark 2007-03-18 02:32:04 UTC
Created attachment 19731 [details]
Suggested patch

This suggested patch adds content-type filtering.
It also supports to get default content type filters to use from the properties
file. I think that solves bug 32184, because now it is easy to specify what
static content you want to avoid in the test plan.

I'm not quite sure that the following lines are correct :
// Default value
contentTypeInclude.setText(JMeterUtils.getProperty("proxy.content_type_include"));


and

// Default value
contentTypeExclude.setText(JMeterUtils.getProperty("proxy.content_type_exclude"));


So please check if this is the correct way of picking up default values from
the properties file.

I have also restructured the GUI slightly from the fix for bug 41876. I have
moved the "controller" and "group" settings inside the "Test plan content"
group. And I have used VerticalPanel with titles, which I think makes it look
nice. Have a look, and apply that GUI change if you like it.

I have also added resource strings which was missed in fix for bug 41876.

I am also using the resource string from the HTTPSamplerGui for the options
that control the HTTPSamplerGUI, instead of having separate strings for the
same thing as proxy_* in the resource files. So I have removed
"proxy_usekeepalive".

And I have added "URL" prefix to the value of patterns_to_exclude,
patterns_to_include in all languages, because I think that makes it more clear
what the filer is applied against. Feel free to ditch that change.
Comment 2 Alf Hogemark 2007-03-18 03:15:52 UTC
Created attachment 19732 [details]
Suggested patch with unit test

This patch contains some simple unit tests for the filtering on content-type
Comment 3 Sebb 2007-03-18 16:38:47 UTC
Thanks!

The JMeterUtils.getProperty() calls seem fine.


The code has been added to SVN.
Comment 4 The ASF infrastructure team 2022-09-24 20:37:39 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1889