Problem: Extra characters showing up in some content delivered from tomcat. I believe they are from the JK connector when it breaks up the content into 8k packets.
Setup: Tomcat 5.5 -> JK 1.2.30 -> SunOne 6.1sp11 I tested using Apache2 and the problem does not show up there. Using apache is not an option here. Here are some snippets of packet captures (tcpdump) to show what I mean. Tomcat to web server through JK connector, same for Sun One and Apache 0090 20 47 4d 54 00 00 0c 43 6f 6e 74 65 6e 74 2d 54 GMT...Content-T 00a0 79 70 65 00 00 08 74 65 78 74 2f 63 73 73 00 00 ype...text/css.. 00b0 0e 43 6f 6e 74 65 6e 74 2d 4c 65 6e 67 74 68 00 .Content-Length. 00c0 00 05 32 32 33 37 33 00 41 42 1f fc 03 1f f8 40 ..22373.AB.....@ 00d0 43 48 41 52 53 45 54 20 22 55 54 46 2d 38 22 3b CHARSET "UTF-8"; 00e0 23 74 70 63 72 7b 62 61 63 6b 67 72 6f 75 6e 64 #tpcr{background 00f0 2d 63 6f 6c 6f 72 3a 57 68 69 74 65 3b 6d 61 72 -color:White;mar 0100 67 69 6e 3a 31 30 70 78 20 30 20 32 30 70 78 20 gin:10px 0 20px Browser from Apache 0120 76 65 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65 ve..Content-Type 0130 3a 20 74 65 78 74 2f 63 73 73 0d 0a 0d 0a 40 43 : text/css....@c 0140 48 41 52 53 45 54 20 22 55 54 46 2d 38 22 3b 23 HARSET "UTF-8";# 0150 74 70 63 72 7b 62 61 63 6b 67 72 6f 75 6e 64 2d tpcr{background- 0160 63 6f 6c 6f 72 3a 57 68 69 74 65 3b 6d 61 72 67 color:White;marg 0170 69 6e 3a 31 30 70 78 20 30 20 32 30 70 78 20 30 in:10px 0 20px 0 Browser from SunOne 00e0 47 4d 54 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 GMT..Content-Typ 00f0 65 3a 20 74 65 78 74 2f 63 73 73 0d 0a 43 6f 6e e: text/css..Con 0100 74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 32 32 33 tent-Length: 223 0110 37 33 0d 0a 54 72 61 6e 73 66 65 72 2d 65 6e 63 73..Transfer-enc 0120 6f 64 69 6e 67 3a 20 63 68 75 6e 6b 65 64 0d 0a oding: chunked.. 0130 0d 0a 31 66 66 38 0d 0a 40 43 48 41 52 53 45 54 ..1ff...@charset 0140 20 22 55 54 46 2d 38 22 3b 23 74 70 63 72 7b 62 "UTF-8";#tpcr{b 0150 61 63 6b 67 72 6f 75 6e 64 2d 63 6f 6c 6f 72 3a ackground-color: 0160 57 68 69 74 65 3b 6d 61 72 67 69 6e 3a 31 30 70 White;margin:10p 0170 78 20 30 20 32 30 70 78 20 30 3b 7d 0a 23 74 70 x 0 20px 0;}.#tp The first snippet is from between the web server and tomcat through the JK connector. This looks the same for either Apache or SunOne. The thing to note is line 00c0 where the hex is 1f f8. The second snippet is when a browser hits Apache. The thing to note is line 0130 where the hex is 0d 0a 0d 0a. (carriage return, line feed, carriage return, line feed) The third snippet is when a browser hits SunOne for the same file. Here on line 0130 there is 0d 0a 31 66 66 38 0d 0a, notice the extra 4 characters between the carriage return/line feeds. And that is where my problem lies. These characters 1ff8 are showing up in the body of the content and is causing errors. I've been looking over the jk_nsapi_plugin.c code but I haven't worked in C in over a decade so I'm fairly lost. Is there any way to get the JK Connector to work the same for SunOne as it does for Apache?