On 12 April 2013 22:10, Philippe Mouawad <philippe.mouawad@gmail.com> wrote:
> On Fri, Apr 12, 2013 at 11:06 PM, sebb <sebbaz@gmail.com> wrote:
>
> > On 12 April 2013 21:17, Philippe Mouawad <philippe.mouawad@gmail.com>
> > wrote:
> >
> > > On Fri, Apr 12, 2013 at 12:11 PM, sebb <sebbaz@gmail.com> wrote:
> > >
> > > > On 11 April 2013 22:15, Philippe Mouawad <philippe.mouawad@gmail.com
> >
> > > > wrote:
> > > >
> > > > > Hello,
> > > > >
> > > > > I wonder what's the best option to fix these 3 bugs:
> > > > >
> > > > > - 54482- HC fails to follow redirects with non-encoded chars
> > > > >
> > > >
> > > > Is that a bug in HC?
> > > >
> > > >
> > >
> >
> > No I don't think so. All is due to non clean URLs and sanitize method
> > > fixes these.
> > >
> > >
> > What sanitize method?
> >
> > org.apache.jmeter.protocol.http.util.ConversionUtils#sanitizeUrl
>
>
This can only work if the input URL is completely unencoded.
Otherwise any % chars will get converted, breaking the URL.
One possibility would be to check for % in the URL, and only sanitise if
not present.
The other possibility might be to just convert unsafe chars (other than %
of course).
Depends on how broken the redirect URLs are.
> >
> > >
> > > > > - 54293- JMeter rejects html tags '<' in query params as
> > invalid
> > > > when
> > > > > they are accepted by the browser
> > > > >
> > > >
> > > > I think that is a bug in IE; the other browsers all encode < and >
> > > >
> > > Same as before
> > >
> > >
> > Again, what method?
> >
> org.apache.jmeter.protocol.http.util.ConversionUtils#sanitizeUrl
>
>
As this is a browser bug, it only affects Proxy recordings and badly
written test plans.
It should be safe enough to fix the Proxy Server to encode this.
> >
> > > >
> > > > > - 54142- HTTP Proxy Server throws an exception when path
> contains
> > > "|"
> > > > > character
> > > > >
> > > > >
> > > > Is it not possible to catch the Exception, and then try the
> > decode-encode
> > > > proposed method?
> > > >
> > >
> > > I also thought about this method, but it will badly impact performances
> > due
> > > to Exception throwing / Catching, don't you think ?
> > >
> > >
> > What does it matter if the ProxyServer is a bit slower?
> >
> > It's not used in performance tests.
> >
> > Misread your proposition. I thought you were proposing that in
> HttpHC3Impl#sample (as reverted code was there).
> Agree with this
>
>
OK.
For the Proxy Recorder we can perhaps have a list of characters that are
known to be unencoded in some browsers.
Can either unconditionally convert such characters, or only do so if the
URI creation fails.
I think the latter is probably better, as potentially some new HTTP
implementation might pass the chars through.
>
> > > Or maybe you think we could cache the result ? but what if there is
> some
> > > variable in it ?
> > >
> >
> > Not relevant.
> >
> >
> > >
> > > > Alternatively, if it is only | that causes the problem, maybe that
> > alone
> > > > could be fixed.
> > > >
> > > > In both cases, a warning should be logged.
> > > >
> > > >
> > > > Should we add a checkbox saying URL is sanitized or not as in fact:
> > > > >
> > > > > - Sanitizing everytime may break current test plan where
> recording
> > > > > through URL record ?
> > > > > -
> > > > >
> > > > >
> > > >
> > >
> >
> http://www.titi.fr/toto/CatalogData/ItemImages\IJ\Items_1152\07_06_015_Na_0_0_0_Aucune_0_Na_Na_Batik_s.jpg
> > > > > to
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> http://www.titi.fr/toto/CatalogData/ItemImages%5CIJ%5CItems_1152%5C07_06_015_Na_0_0_0_Aucune_0_Na_Na_Batik_s.jpg
> > > > > - No sanitizing generates the bugs 54482, 54293, 54142
> > > > > - Regarding redirect url, we would need to handle this within
> > > redirect
> > > > > processing
> > > > >
> > > > >
> > > > > Any ideas ?
> > > > > --
> > > > > Regards
> > > > > Philippe
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Cordialement.
> > > Philippe Mouawad.
> > >
> >
>
>
>
> --
> Cordialement.
> Philippe Mouawad.
>
|