2014-10-12 13:57 GMT+04:00 Mark Thomas <[email protected]>: > On 12/10/2014 01:30, Konstantin Kolinko wrote: >> 2014-10-11 14:26 GMT+04:00 Konstantin Kolinko <[email protected]>: >>> 2014-10-11 5:44 GMT+04:00 Bill Barker <[email protected]>: >>>> 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 [email protected]. >>>> >>>> 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.
One more: It is odd that filtering of MessageBytes is skipped if mb.getType() is already T_BYTES. I think those methods, and new/moved method TesterAjpMessage.appendString() shall filter CTLs. I was thinking about helper method, such as filterCTLs(byte[], int offset, int length). >> 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? Local int variable is not an object. I think that it is created on stack and there is no gc involved. (I may be wrong here though). Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
