2009-04-14:
[8:52] <kstrieder> novice helma user has a question on the response object. anybody?[8:55] <kstrieder> anybody on?[9:00] <kstrieder> abyvidy ib[9:01] <kstrieder> anybody on?[9:08] <decke> kstrieder: what's the question?[9:08] <kstrieder> hi, i want to create a multipart-response.[9:09] <kstrieder> what's the way to get around the header-control through the helma response object?[9:10] <decke> good morning chris[9:10] <kstrieder> I could live with outputting the raw headers myself in this case.[9:10] <decke> kstrieder: zumbrunn could probably answer that question...[9:11] <kstrieder> hi chris. I want to create a http-mulitpart response through an action.[9:28] <kstrieder> anybody on?[9:29] <simono> yeah, kstrieder, but no idea .. .docs say there is res.addHeader[9:29] <kstrieder> simono: seems I need more like a "res.deleteHeader" or an equivalent to nph-scripts (non parsing header)[9:31] <simono> don't know what nph is[9:32] <kstrieder> in the traditional cgi-world it's the signal to the cgi-wrapper to direct a scripts output stream directly to the http-response-channel.[9:32] <kstrieder> responsibility for correct http-headers is on the script.[9:36] <simono> i see[9:45] <kstrieder> i'll check back later[9:45] <kstrieder> cu[10:22] <kstrieder> hi, anybody listening? I've got a problem with multipart and the response object.[10:25] <decke> kstrieder: how does html multipart look? do you have an example?[10:26] <kstrieder> I'ld like to generate a response that looks like that:[10:26] <kstrieder> Content-type: multipart/x-mixed-replace;boundary=End[10:26] <kstrieder> --End[10:26] <kstrieder> Content-type: image/gif[10:26] <kstrieder> Image #1[10:26] <kstrieder> --End[10:26] <kstrieder> Content-type: image/gif[10:26] <kstrieder> Image #2[10:26] <kstrieder> --End[10:26] <kstrieder> Content-type: image/gif[10:26] <kstrieder> Image #3[10:26] <kstrieder> --End--[10:26] <kstrieder> see http://oreilly.com/openbook/cgi/ch06_06.html[10:26] <kstrieder> and my application needs some time between image 1 and 2.[10:27] <decke> ah okay so we are talking about response[10:27] <kstrieder> yepp, in the webs I found only information concerning helma multipart form and mail[10:28] <decke> hm and what's the actual problem?[10:28] <kstrieder> how to generate this response.[10:28] <decke> res.write()[10:28] <decke> isn't enough?[10:28] <kstrieder> helma is watching and filtering anything i write, writeBinary or writelin with res.write.[10:29] <kstrieder> res.write is watched and controlled by helma.[10:29] <kstrieder> res.contentType dito.[10:29] <decke> res.addHeader("Content-Type", "image/gif");[10:29] <kstrieder> that's not multipart.[10:30] <decke> ah okay that's the second part[10:30] <kstrieder> and I need to tell helma to flush the response.[10:31] <kstrieder> because the first image needs to go to the client before the second is finished.[10:32] <simono> found the jetty docs talking about multipart response, but i don't think helma exposes this. basically you directly write to ServletOutputStream, which you can get from the ServletResponse[10:34] <decke> kstrieder: may i ask why you exactly need a multipart solution?[10:35] <kstrieder> decke: because I want to give a direct response and may need to replace that with more details.[10:36] <kstrieder> another way, with text, not images, is an ajax hack to keep the browser listening without polling.[10:37] <decke> yeah i know the problem because all web bases chatengines have the same problem and use long living sockets[10:37] <decke> or comet which seems to be a bit more popular nowadays...[10:42] <simono> kstrieder, is the ajax "hack" really that bad? seems to me you want multiple objects, so multiple request dont' seem absurd[10:44] <kstrieder> I can't afford multiple requests.[10:48] <simono> are you doint the animation-examples from the oreilly-book? you could paste all images into one and cut them up clientside[10:49] <kstrieder> simono: problem is, I need a controlled time between these images.[10:50] <simono> for the animation? to be true.. this seems like a bad way to do animations, although i appreciate the challenge :)[10:50] <kstrieder> simono: depends on the animation ;-)[10:51] <decke> kstrieder: ever looked at youtube they have some sort of "animation" when onMouseOver[10:51] <kstrieder> by the way: getOutputStream works.[10:51] <simono> okay, yes - what kind of animation is it going to be?[10:51] <kstrieder> NOT[10:51] <simono> great[10:51] <simono> arg[10:51] <kstrieder> I still have a helma/jetty header before my part begins.[10:51] <kstrieder> see:[10:51] <kstrieder> HTTP/1.1 200 OK[10:51] <kstrieder> Date: Tue, 14 Apr 2009 10:54:21 GMT[10:51] <kstrieder> Server: Jetty/5.1.14 (Linux/2.6.22.17-0.1-default i386 java/1.6.0_05[10:51] <kstrieder> Expires: Thu, 01 Jan 1970 00:00:00 GMT[10:51] <kstrieder> Set-Cookie: HopSession=127.0.0.t6xj7q01ack3;Path=/[10:51] <kstrieder> Connection: close[10:52] <kstrieder> Content-Type: multipart/x-mixed-replace; boundary=DEADBEEFmustTasteGr8[10:52] <kstrieder> --DEADBEEFmustTasteGr8[10:52] <kstrieder> Content-Type: image/gif[10:52] <kstrieder> Content-Length: 43[10:52] <kstrieder> oops, the newline after "Connectino: close" is missing due to irc.[10:54] <decke> kstrieder: you probably know why you want helma to do that but if not then there are other better suited solutions: http://code.google.com/p/msgbus/[10:55] <kstrieder> decke: that looks promising, but my goal was to have only one server class application to maintain[10:58] <decke> kstrieder: real life is never perfect ... if you don't need a very efficient and scalable solution it might work for you with helma but it's not designed for that[11:00] <kstrieder> apache/cgi-nph would have been a simpler solution too.[11:10] <kstrieder> now I'm down to: how to get rid of the helma/jetty headers?[11:10] <kstrieder> tried reset() and flushBuffer without desired effect.[11:15] <kstrieder> now I'm down to: howto flush the buffer without having ended the request. everything works already.[13:46] <simono> Irakli, you here? i was wondering if your bespin-js port is public already?
In the channel now:
Logs by date: