goodcui / owaspantisamy

Automatically exported from code.google.com/p/owaspantisamy
0 stars 0 forks source link

testCompareSpeeds fails #91

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Attempt to build AntiSamy or run AntiSamyTest directly

What is the expected output? What do you see instead?

Expect to see valid test success. Instead get an error: 

testComapreSpeeds caused an ERROR: The input was too large. The specified input 
was 235,157 bytes and the maximum is 200,000 bytes. 

-- 

It appears that www.fark.com has upped their homepage to 235,157 bytes, causing 
this test to fail. 

Either we need to up that limit or skip sites which are larger than 200,000 
bytes. 

Original issue reported on code.google.com by augu...@gmail.com on 19 Oct 2010 at 8:24

GoogleCodeExporter commented 9 years ago
Proposed patch attached. This patch skips any input which is greater than the 
maximum allowed size rather than throwing an exception and forcing the test to 
fail. 

I will check this in unless there are any objections. 

The test now produces output like this: 

About to scan: http://slashdot.org/ size: 116914
About to scan: http://www.fark.com/ size: 237924
   -Maximum input size exceeded. SKIPPING.
About to scan: http://www.cnn.com/ size: 98161
About to scan: http://google.com/ size: 8969
About to scan: http://www.microsoft.com/en/us/default.aspx size: 73383
About to scan: http://deadspin.com/ size: 121214
Total DOM time: 0.17913333333333334
Total SAX time: 0.10873333333333335

Original comment by augu...@gmail.com on 19 Oct 2010 at 8:38

Attachments:

GoogleCodeExporter commented 9 years ago
Change checked in to SVN.

Original comment by augu...@gmail.com on 19 Oct 2010 at 10:28