On 12/10/2014 01:30, Konstantin Kolinko wrote:
> 2014-10-11 14:26 GMT+04:00 Konstantin Kolinko <knst.koli...@gmail.com>:
>> 2014-10-11 5:44 GMT+04:00 Bill Barker <billbar...@apache.org>:
>>> To whom it may engage...
>>>
>>> This is an automated request, but not an unsolicited one. For
>>> more information please visit http://gump.apache.org/nagged.html,
>>> and/or contact the folk at gene...@gump.apache.org.
>>>
>>> Project tomcat-trunk-test-bio has an issue affecting its community 
>>> integration.
>>> This issue affects 1 projects.
>>> The current state of this project is 'Failed', with reason 'Build Failed'.
>>> For reference only, the following projects are affected by this:
>>>     - tomcat-trunk-test-bio :  Tomcat 8.x, a web server implementing the 
>>> Java Servlet 3.1,
>>> ...
>>>
>>>
>>> Full details are available at:
>>>     
>>> http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-bio/index.html
>>>
>>
> 
>> The following one test is failing:
>>
>> Testsuite: org.apache.tomcat.util.http.TestCookieProcessorGenerationHttp
>> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.935 sec
>> ------------- Standard Error -----------------
>>
>> Testcase: testUtf8CookieValue took 1.918 sec
>> FAILED
>> expected:<Test=[__]> but was:<Test=[]>
>> junit.framework.AssertionFailedError: expected:<Test=[__]> but was:<Test=[]>
>> at 
>> org.apache.tomcat.util.http.TestCookieProcessorGenerationHttp.testUtf8CookieValue(TestCookieProcessorGenerationHttp.java:63)
> 
> 
> This is regression from https://svn.apache.org/r1630910
> 
> The following filtering code is incorrect:
> in o.a.coyote.http11.AbstractOutputBuffer and the same for AJP protocol:
> 
>             byte[] buffer = bc.getBuffer();
>             for (int i = bc.getOffset(); i < bc.getLength(); i++) {
>                 if (((buffer[i] <= 31) && (buffer[i] != 9)) ||
>                         buffer[i] == 127 || buffer[i] > 255) {
>                     buffer[i] = ' ';
>                 }
>             }
> 
> The header is Set-Cookie with value of "Test=\u0120" which becomes the
> following array of byte[]:
> [84, 101, 115, 116, 61, -60, -96]
> 
> The last two bytes are negative and thus are replaced by whitespace character.

Thanks. I'll get that fixed shortly.

> By the way, buffer[i] could be saved to a local variable instead of
> reevaluating it several times.

Is it worth doing that compared to the cost of creating and gc'ing the
local variable?

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to