From: Stephen D. <sd...@us...> - 2006-02-27 08:31:24
|
Update of /cvsroot/naviserver/naviserver/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4861/tests Modified Files: tclresp.test Log Message: * nsd/connio.c (Ns_ConnSend): * tests/tclresp.test: Fix bug with buffer management triggered by data too large to be sent in a single call to the OS. Don't copy unsent iovec's around if there are no additional ones to be added to the set. Index: tclresp.test =================================================================== RCS file: /cvsroot/naviserver/naviserver/tests/tclresp.test,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tclresp.test 24 Feb 2006 06:36:18 -0000 1.6 --- tclresp.test 27 Feb 2006 08:31:19 -0000 1.7 *************** *** 164,167 **** --- 164,199 ---- } -result {200 text/plain 1 x} + test tclresp-3.2 {ns_return} -constraints serverListen -setup { + ns_register_proc GET /tclresp { + ns_return 200 text/plain [string repeat x 1024] + } + } -body { + nstest_http -getbody 1 GET /tclresp + } -cleanup { + ns_unregister_proc GET /tclresp + } -result [list 200 [string repeat x 1024]] + + test tclresp-3.3 {ns_return large string} -constraints serverListen -setup { + ns_register_proc GET /tclresp { + ns_return 200 text/plain [string repeat x 48982] + } + } -body { + nstest_http -getbody 1 GET /tclresp + } -cleanup { + ns_unregister_proc GET /tclresp + } -result [list 200 [string repeat x 48982]] + + test tclresp-3.4 {ns_return larger string than can be sent in one write} \ + -constraints serverListen -setup { + + ns_register_proc GET /tclresp { + ns_return 200 text/plain [string repeat x 48983] + } + } -body { + nstest_http -getbody 1 GET /tclresp + } -cleanup { + ns_unregister_proc GET /tclresp + } -result [list 200 [string repeat x 48983]] + *************** *** 371,375 **** ns_register_proc GET /tclresp { ns_headers 200 ! eval ns_write [split [string repeat x 2000] ""] } } -body { --- 403,407 ---- ns_register_proc GET /tclresp { ns_headers 200 ! eval ns_write [split [string repeat x 750][string repeat y 750][string repeat z 750] ""] } } -body { *************** *** 377,381 **** } -cleanup { ns_unregister_proc GET /tclresp ! } -result "200 [string repeat x 2000]" test tclresp-12.5 { --- 409,413 ---- } -cleanup { ns_unregister_proc GET /tclresp ! } -result "200 [string repeat x 750][string repeat y 750][string repeat z 750]" test tclresp-12.5 { |