You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2012/12/13 18:01:01 UTC

[Bug 54293] New: JMeter rejects html tags '<' in query params as invalid when they are accepted by the borwser

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

            Bug ID: 54293
           Summary: JMeter rejects html tags  '<' in query params as
                    invalid when they are accepted by the borwser
           Product: JMeter
           Version: 2.8
          Hardware: PC
                OS: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: HTTP
          Assignee: issues@jmeter.apache.org
          Reporter: oliver_lloyd@hotmail.com
    Classification: Unclassified

The URI below is a valid SOLR request but it is rejected by JMeter with the
error given. It appears that the '<' char is being rejected (the index 181
actually refers to this character).

http://my-solr-server.com/solr/collection1/select/?facet=true&facet.mincount=1&spellcheck.extendedResults=true&spellcheck.q=lego+land&hl.simple.pre=<strong>&wt=xml&version=2.2&rows=10&spellcheck.accuracy=0.8&start=0&q=lego+land&hl.simple.post=</strong>&qt=sun

Response code: Non HTTP response code: java.net.URISyntaxException
Response message: Non HTTP response message: Illegal character in query at
index 181:

Putting html tags as query params is an odd thing to do but nonetheless the
browser and server will accept this request and I am served valid results in
response in order to run a valid test with representative requests I need
JMeter to accept and send this request.

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

[Bug 54293] JMeter rejects html tags '<' in query params as invalid when they are accepted by the browser

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54293

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|JMeter rejects html tags    |JMeter rejects html tags
                   |'<' in query params as      |'<' in query params as
                   |invalid when they are       |invalid when they are
                   |accepted by the borwser     |accepted by the browser

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

[Bug 54293] JMeter rejects html tags '<' in query params as invalid when they are accepted by the browser

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54293

--- Comment #11 from Sebb <se...@apache.org> ---
We should probably document that the behaviour of JMeter for URLs provided as a
full path is different from the behaviour where the URL is provided via
parameters.

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

[Bug 54293] JMeter rejects html tags '<' in query params as invalid when they are accepted by the browser

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54293

Bug 54293 depends on bug 54482, which changed state.

Bug 54482 Summary: HC fails to follow redirects with non-encoded chars
https://issues.apache.org/bugzilla/show_bug.cgi?id=54482

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

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

[Bug 54293] JMeter rejects html tags '<' in query params as invalid when they are accepted by the browser

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54293

--- Comment #12 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
I agree with you sebb.
Recording this kind of URL by JMeter Proxy leads to correct HTTP Sampler
configuration, all parameters are correctly encoded.
What is the best place for documenting this ? HTTP Sampler documentation ?

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

[Bug 54293] JMeter rejects html tags '<' in query params as invalid when they are accepted by the borwser

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54293

--- Comment #2 from oliver lloyd <ol...@hotmail.com> ---
Created attachment 29752
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29752&action=edit
Example jmx

Example lines from data file:
facet=true&facet.mincount=1&spellcheck.extendedResults=true&spellcheck.q=miliband+wallace&hl.simple.pre=<strong>&wt=xml&rows=10&version=2.2&spellcheck.accuracy=0.8&start=0&q=miliband+wallace&hl.simple.post=</strong>&qt=sun
wt=xml&rows=3&version=2.2&start=0&q=miliband+wallace&qt=bestLinks&fq=bestlinks_context:sun+OR+bestlinks_context:StoTtoSun
facet=true&facet.mincount=1&spellcheck.extendedResults=true&spellcheck.q=50+shades+of+grey&hl.simple.pre=<strong>&wt=xml&rows=10&version=2.2&spellcheck.accuracy=0.8&start=0&q=50+shades+of+grey&hl.simple.post=</strong>&qt=sun
wt=xml&rows=3&version=2.2&start=0&q=50+shades+of+grey&qt=bestLinks&fq=bestlinks_context:sun+OR+bestlinks_context:StoTtoSun
facet=true&facet.mincount=1&spellcheck.extendedResults=true&spellcheck.q=germans&hl.simple.pre=<strong>&wt=xml&rows=10&version=2.2&spellcheck.accuracy=0.8&start=0&q=germans&hl.simple.post=</strong>&qt=sun

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

[Bug 54293] JMeter rejects html tags '<' in query params as invalid when they are accepted by the borwser

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54293

--- Comment #5 from Casey Dunham <ca...@gmail.com> ---
The query portion of the URL should always be URL encoded.

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

[Bug 54293] JMeter rejects html tags '<' in query params as invalid when they are accepted by the browser

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54293

Bug 54293 depends on bug 54482, which changed state.

Bug 54482 Summary: HC fails to follow redirects with non-encoded chars
https://issues.apache.org/bugzilla/show_bug.cgi?id=54482

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|---                         |FIXED

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

[Bug 54293] JMeter rejects html tags '<' in query params as invalid when they are accepted by the borwser

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54293

oliver lloyd <ol...@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P4

--- Comment #3 from oliver lloyd <ol...@hotmail.com> ---
File attached.

I looked into this further and I am only seeing this error when using either
the HttpClient3.1 & HttpClient4 implementations. The original jmx was using the
default - blank - option for this select field which, I presume, uses one of
these. When I select Java for the implementation value I do not see this issue
and the request is made as expected.

It could well be that this is the correct response based on the implementation.
I'm happy to close this issue in that case.

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

[Bug 54293] JMeter rejects html tags '<' in query params as invalid when they are accepted by the browser

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54293

--- Comment #7 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Date: Mon Feb  4 22:03:18 2013
New Revision: 1442393

URL: http://svn.apache.org/viewvc?rev=1442393&view=rev
Log:
Bug 54293 - JMeter rejects html tags '<' in query params as invalid when they
are accepted by the browser
Bugzilla Id: 54293

Modified:
    jmeter/trunk/xdocs/changes.xml

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

[Bug 54293] JMeter rejects html tags '<' in query params as invalid when they are accepted by the browser

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54293

Sebb <se...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #13 from Sebb <se...@apache.org> ---
URL: http://svn.apache.org/r1511153
Log:
Clarify behaviour when path contains a full URL

Modified:
    jmeter/trunk/xdocs/usermanual/component_reference.xml

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

[Bug 54293] JMeter rejects html tags '<' in query params as invalid when they are accepted by the borwser

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54293

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om
           Hardware|PC                          |All

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

[Bug 54293] JMeter rejects html tags '<' in query params as invalid when they are accepted by the borwser

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54293

Sebb <se...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Sebb <se...@apache.org> ---
There are various different ways of doing this in JMeter.

Please attach the simplest JMX file which shows how you are creating the
request.

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

[Bug 54293] JMeter rejects html tags '<' in query params as invalid when they are accepted by the browser

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54293

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Depends on|                            |54482
         Resolution|---                         |FIXED

--- Comment #6 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Fixed within 54482 fix

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

[Bug 54293] JMeter rejects html tags '<' in query params as invalid when they are accepted by the borwser

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54293

Sebb <se...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #4 from Sebb <se...@apache.org> ---
The JMX file uses the path field to provide the full path, including the
parameters.

There's no option to encode this - afaik path names don't have to be encoded.

So you'll need to encode the relevant parts of the field, or put the parameters
into the appropriate fields on the form.

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

[Bug 54293] JMeter rejects html tags '<' in query params as invalid when they are accepted by the browser

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54293

--- Comment #10 from Sebb <se...@apache.org> ---
Note that Firefox, Opera and Chrome all encode the < and > before contacting
the server.

IE 8 does not seem to do so; that is probably a bug in IE.

I'm inclined to close this as won't fix or perhaps invalid.

===

BTW, an easy way to check what browsers do is to run the JMeter mirror server,
and then use the browser with a URL such as:

http://localhost:8081/solr/?<>

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

[Bug 54293] JMeter rejects html tags '<' in query params as invalid when they are accepted by the browser

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54293

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #8 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Fix introduces regressions on this kind of URLs
http://XXX.XXXX.com/toto_titi_tata/CatalogData/ItemImages\IJ\Items_1152\07_06_015_Na_0_0_0_Aucune_0_Na_Na_Batik_s.jpg

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

[Bug 54293] JMeter rejects html tags '<' in query params as invalid when they are accepted by the browser

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54293

--- Comment #9 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Date: Thu Apr 11 20:24:48 2013
New Revision: 1467074

URL: http://svn.apache.org/r1467074
Log:
Rollback to fix of bugs:
54482- HC fails to follow redirects with non-encoded chars
54293- JMeter rejects html tags '&lt;' in query params as invalid when they are
accepted by the browser
54142- HTTP Proxy Server throws an exception when path contains "|" character

Bugzilla Id: 54482,54293,54142

Modified:
   
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java
   
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
    jmeter/trunk/xdocs/changes.xml

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