-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 Hi, What I want to do is read data from network (maybe from remote system) and output read data as if it were file download from client(web browser)'s view. I yet, cannot figure out how to send raw HTTP response to client. Can anyone point me to the doc or other references?\ Thanks in advance. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFogniQqspS1+XJHgRAhqMAJ9lPnTGcmkXUaWvqEs6rXQltj7aQACgrWtz Y1NQQU0myqBAKdHYdauXWAs= =RTFu -----END PGP SIGNATURE----- _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> What I want to do is read data from network (maybe from remote system)
> and output read data as if it were file download from client(web > browser)'s view. I yet, cannot figure out how to send raw HTTP response > to client. Can anyone point me to the doc or other references? self session returnResponse: aResponse. where aResponse is an instance of WAResponse. Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Chun, Sungjin
Hi, thanks for your help. But I have another question now.
If I use WAResponse, can I avoid creation of big WAResponse object? What I mean is that I want to send big data (more than 600MB), if user clicks on a link. It seams that I have to pre-create a big WAResponse instance(actual size is determined by size of a stream). Thank you in advance again. ----- Original Message ----- From: Lukas Renggli <[hidden email]> To: "The Squeak Enterprise Aubergines Server - general discussion." <[hidden email]> Sent: 07-01-08 18:35:11 Subject: Re: Re: [Seaside] [Q] How can I Send Raw Response? > What I want to do is read data from network (maybe from remote system) > and output read data as if it were file download from client(web > browser)'s view. I yet, cannot figure out how to send raw HTTP response > to client. Can anyone point me to the doc or other references? self session returnResponse: aResponse. where aResponse is an instance of WAResponse. Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Chun, Sungjin
Hi, thanks for your help. But I have another question now.
If I use WAResponse, can I avoid creation of big WAResponse object? What I mean is that I want to send big data (more than 600MB), if user clicks on a link. It seams that I have to pre-create a big WAResponse instance(actual size is determined by size of a stream). Thank you in advance again. ----- Original Message ----- From: Lukas Renggli <[hidden email]> To: "The Squeak Enterprise Aubergines Server - general discussion." <[hidden email]> Sent: 07-01-08 18:35:11 Subject: Re: Re: [Seaside] [Q] How can I Send Raw Response? > What I want to do is read data from network (maybe from remote system) > and output read data as if it were file download from client(web > browser)'s view. I yet, cannot figure out how to send raw HTTP response > to client. Can anyone point me to the doc or other references? self session returnResponse: aResponse. where aResponse is an instance of WAResponse. Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Chun, Sungjin
> If I use WAResponse, can I avoid creation of big WAResponse object?
You can avoid the creation of a big WAResponse by subclassing (or by creating your own response-class) and defining a method #contents that does something smarter, like returning a file-stream instead of a memory-stream. However, I would suggest to avoid letting Smalltalk handle such huge responses. It doesn't scale well for that matter. Since your data is not coming from your image it is much more efficient if you use Apache and Rewrite rules for that. Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 Lukas Renggli wrote: >> If I use WAResponse, can I avoid creation of big WAResponse object? > > You can avoid the creation of a big WAResponse by subclassing (or by > creating your own response-class) and defining a method #contents that > does something smarter, like returning a file-stream instead of a > memory-stream. Oh, yes, right! Thanks. > > However, I would suggest to avoid letting Smalltalk handle such huge > responses. It doesn't scale well for that matter. Since your data is > not coming from your image it is much more efficient if you use Apache > and Rewrite rules for that. > The data must be fetched through some kind of program (the source of data needs some kind of authenticating process and the data should be fetched case by case process). And this program does not need that kind of large scalability, it's used by < 2 people concurrently. :-) Thanks again for your help. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFojyyQqspS1+XJHgRApStAKChv1ujy64iw3jeTcB1AJm5bHSg6ACdEvhW yRpoYhE2ikkjx480owPW/z8= =BGXs -----END PGP SIGNATURE----- _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |