Re: [naviserver-devel] how to check if nsd has zlib?

2023-03-15 Thread Gustaf Neumann



On 15.03.23 19:50, Andrew Piskorski wrote:

On Windows, what's the best (simple?) way to check if my nsd is
actually linked correctly with zlib?


If zlib is not linked correctly, you would get errors during linking.

The easiest thing to test, whether compression via zlib works fine
is to test this via browser (e.g., browse the file
tests/testserver/pages/ns_adp_compress.adp)

Since the errors you get are from "nstest::http-0.9", i would
not be surprised, if this is related with the last problem you reported,
also using the old-style regression test interface.

The code in "nstest::http-0.9" is quite old, it has not been changed
since ages. Are you sure, these tests were working before? It can
also be that this the one-of-content detection was never correct
but happened to work due to different buffering in tcl/c-library/OS/

all the best

-g



___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


[naviserver-devel] how to check if nsd has zlib?

2023-03-15 Thread Andrew Piskorski
On Windows, what's the best (simple?) way to check if my nsd is
actually linked correctly with zlib?

Reason I ask, is on Windows I was always getting warnings like this:

  Warning: init server test: compress is enabled, but no zlib support built in

I've now installed zlib-1.2.13, and am playing with the build to try
and make Naviserver use it.  That made the, "no zlib support built in"
warning go away, but I'm not sure if I'm linking zlib correctly.  I
still get the three "compress" test failures below, but I don't know
if this means my zlib support is completely missing or broken, or some
other problem.


 compress-3.3 ns_write streaming, compressed FAILED
 Contents of test case:

set b [nstest::http-0.9  -http 1.0  -getbinary 1  -encoding binary  
-setheaders {Accept-Encoding gzip}  -getheaders {Content-Encoding Vary}  GET 
/compress]
list {*}[lrange $b 0 2] [llength [lindex $b end]] [lrange [lindex $b end] 
end-15 end]

 Result was:
200 gzip Accept-Encoding 37 {ff ff 52 48 54 28 49 2d 2e e1 02 00 00 00 ff ff}
 Result should have been (exact matching):
200 gzip Accept-Encoding 47 {02 00 00 00 ff ff 03 00 12 13 05 72 0f 00 00 00}
 compress-3.3 FAILED


 compress-3.4 streaming adp, compressed FAILED
 Contents of test case:

set b [nstest::http-0.9  -http 1.0  -getbinary 1  -encoding binary  
-setheaders {Accept-Encoding gzip}  -getheaders {Content-Encoding Vary}  GET 
/ns_adp_compress.adp?stream=1]
list {*}[lrange $b 0 2] [llength [lindex $b end]] [lrange [lindex $b end] 
end-20 end]

 Result was:
200 gzip Accept-Encoding 30 {0a 2a c9 c8 2c 56 00 a2 44 85 92 d4 e2 12 2e 00 00 
00 00 ff ff}
 Result should have been (exact matching):
200 gzip Accept-Encoding 40 {92 d4 e2 12 2e 00 00 00 00 ff ff 03 00 12 13 05 72 
0f 00 00 00}
 compress-3.4 FAILED


 compress-3.5 ns_write streaming + HTTP 1.1 chunking, compressed FAILED
 Contents of test case:

set b [nstest::http-0.9  -http 1.1  -getbinary 1  -encoding binary  
-setheaders {Accept-Encoding gzip}  -getheaders {Content-Encoding Vary 
Transfer-Encoding Content-Length}  GET /compress]
list {*}[lrange $b 0 3] [llength [lindex $b end]] [lrange [lindex $b end] 
end-30 end]

 Result was:
200 gzip Accept-Encoding chunked 44 {2a c9 c8 2c 56 c8 2c 06 00 00 00 ff ff 0a 
65 0a 52 48 54 28 49 2d 2e e1 02 00 00 00 ff ff 0a}
 Result should have been (exact matching):
200 gzip Accept-Encoding chunked 60 {52 48 54 28 49 2d 2e e1 02 00 00 00 ff ff 
0a 61 0a 03 00 12 13 05 72 0f 00 00 00 0a 30 0a 0a}
 compress-3.5 FAILED

-- 
Andrew Piskorski 


___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel