how do you accomodate multi-mb size files? Martin Gainty ______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > To: users@tomcat.apache.org > From: wbar...@wilshire.com > Subject: Re: chunked encoding > Date: Sat, 13 Jun 2009 17:29:44 -0700 > > > "Christopher Schultz" <ch...@christopherschultz.net> wrote in message > news:4a32c4e3.6060...@christopherschultz.net... > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > Anthony, > > > > On 6/12/2009 1:47 PM, Anthony J. Biacco wrote: > >> Well, they used to be static JS files, then we decide we wanted more > >> flexibility in the content that went into them, so we stuck them in a > >> database and decided to generate them as needed. > > > > Er.. SELECT LENGTH(content), content FROM content_table? > > > > Or are you saying that you get some kind of template from the database > > and fill-in the details dynamically. > > > > I have to imagine that you could figure out the length of this data > > before you start streaming it back to the client. In that case, you > > simply have to provide your own Content-Length header. > > > > This just sounds like you're making it harder than it is. > > > > Generally going to agree with Chris here that you're making it harder than > it is. If you are sending files on the order of about 12Kb (as specified in > another post), then just put a Filter in front of it that wraps the response > and the wrapper buffers the content, and then sets the content-length header > when control returns to the Filter. I did one of these as a toy a few years > back (meaning that the coding style is awful), but it worked fine. Of > course, this doesn't work well if you expect to send multi MB sized files. > > > - -chris > > -----BEGIN PGP SIGNATURE----- > > Version: GnuPG v1.4.9 (MingW32) > > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > > > iEYEARECAAYFAkoyxOMACgkQ9CaO5/Lv0PD/GQCgwEZm3lMeEoSww1P/4gBysiQi > > 8lcAnitGUVWQNzCA2LNVT+jwdnAZDQAF > > =tS84 > > -----END PGP SIGNATURE----- > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > _________________________________________________________________ Hotmail® has ever-growing storage! Don’t worry about storage limits. http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009