Re: [Simpleweb-Support] Extra Transfer-Encoding header
Brought to you by:
niallg
From: Jerome L. <co...@no...> - 2006-11-01 13:26:43
|
Hi again, Looking at the Simple code, I've noticed that if the setContentLength() = is not called on Simple's Response then a "-1" value is assumed (unknown length). So I'm now setting it to "0" when I don't have a response = entity. This removes the "Transfer-Encoding: chunked" header.=20 Now, I have a "Content-Length: 0" header which is OK, but should = probably be removed. This can be done by patching the setContentLength(int length) method in MonitoredResponse as below: + this.length =3D length; - set("Content-Length", String.valueOf(length)); + if(length > 0) set("Content-Length", String.valueOf(length)); Could you integrate this patch to the next release Simple? BTW, the Resources/Downloads link on the front page is a bit misleading: = I always expect to get the downloads page instead of the statistics. Maybe = it should be renamed and the Simple/Download menu entry be moved to the Resources menu too? Best regards, Jerome > -----Message d'origine----- > De : sim...@li...=20 > [mailto:sim...@li...] De=20 > la part de Jerome Louvel > Envoy=E9 : mercredi 1 novembre 2006 12:16 > =C0 : sim...@li... > Objet : [Simpleweb-Support] Extra Transfer-Encoding header >=20 >=20 > Hi Niall, >=20 > It appears that Simple is adding an extra "Transfer-Encoding: chunked" > header to responses that don't contain an entity, like 304 responses. >=20 > I'm having some issues with Safari browsers and suspect this,=20 > among other > things, to be the reason.=20 >=20 > Is there a way to disable this behavior, or could this be fixed? >=20 > Best regards, > Jerome Louvel >=20 >=20 > -------------------------------------------------------------- > ----------- > Using Tomcat but need to do more? Need to support web=20 > services, security? > Get stuff done quickly with pre-integrated technology to make=20 > your job easier > Download IBM WebSphere Application Server v.1.0.1 based on=20 > Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057& > dat=3D121642 > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support |