From lcycenter at gmail.com Tue Feb 6 04:05:04 2007 From: lcycenter at gmail.com (David Lin) Date: Tue, 6 Feb 2007 17:05:04 +0800 Subject: Question about file upload max size Message-ID: Hi, We use merb for our file upload server. Everything is ok except file upload size limit, we want to cancel file upload process immediately once we learn that the size of upload files has exceed the max size limit. First, we try to hack MerbUploadHandler#request_begins(here, we can get CONTENT_LENGTH), but get trouble to cancel the upload process elegantly. Currently, we have no choice but to let browser to do the work. Our web client will query process info from server, and it know the max size limit, when it find that the size > allowed maxsize, it will cancel the upload task by IFRAME.stop. This solution solve our problem, but it's ugly. Have other better solution? Thanks David Lin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20070206/2770a89e/attachment.html From tennisbum2002 at hotmail.com Wed Feb 7 23:44:15 2007 From: tennisbum2002 at hotmail.com (Tennisbum) Date: Wed, 7 Feb 2007 20:44:15 -0800 Subject: RAW_POST_DATA not in header Message-ID: Has anyone been able to successfully access the RAW_POST_DATA? I know Rails has a fix for this. Haven't been able to do it in Merb. I tried doing "request.body.read" which gives nothing, however when I do request.body.length, I get a length over 2000. I tried accessing $stdin, however I can't seem to get the darn data out of it. Aryk -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20070207/623ce95a/attachment.html From lcycenter at gmail.com Wed Feb 14 22:13:19 2007 From: lcycenter at gmail.com (David Lin) Date: Thu, 15 Feb 2007 11:13:19 +0800 Subject: wrong startup information in production environment Message-ID: Hi, I check out the last codes from merb repository. And the startup information for production environment just like that: ====================================================== dev:/var/www/apps/upload_merb/current/log# /etc/init.d/merb_init start Merb started with these options: --- :template_ext: :html: :herb :js: :jerb :xml: :xerb :config: dist/conf/upload.conf :drb_server_port: 32323 :sql_session: true :cluster: 2 :cache_templates: false :host: 127.0.0.1 :port: "6000" :allow_reloading: true :start_drb: true :merb_root: /var/www/apps/upload_merb/current :merb_config: /var/www/apps/upload_merb/current/dist/conf/merb.yml :environment: production Starting merb drb server on port: 32323 Starting merb server on port: 6000 Starting merb server on port: 6001 ====================================================== It's "production" environment, and the showed "allow_reloading" / "cache_templates" information is wrong. I dig into the merb codes, find that merb show options information in merb_config(...), but some options(:allow_reloading/show_error/cache_templates) are likely to be changed in run(...) according the value of environment. So it's better to show option informations in run(...) after all options have been decided. Thanks DavidLin From ez at engineyard.com Thu Feb 15 00:28:28 2007 From: ez at engineyard.com (Ezra Zygmuntowicz) Date: Wed, 14 Feb 2007 21:28:28 -0800 Subject: wrong startup information in production environment In-Reply-To: References: Message-ID: <3487A977-F89F-4AD0-BBF4-6AD88AEEF146@engineyard.com> Hey David- Nice catch! Thank you. I'll fix this right away. merb_server.rb has grown a bit out of control and is due for refactoring anyways. Thanks -Ezra On Feb 14, 2007, at 7:13 PM, David Lin wrote: > Hi, > > I check out the last codes from merb repository. And the startup > information for production environment just like that: > ====================================================== > dev:/var/www/apps/upload_merb/current/log# /etc/init.d/merb_init start > Merb started with these options: > --- > :template_ext: > :html: :herb > :js: :jerb > :xml: :xerb > :config: dist/conf/upload.conf > :drb_server_port: 32323 > :sql_session: true > :cluster: 2 > :cache_templates: false > :host: 127.0.0.1 > :port: "6000" > :allow_reloading: true > :start_drb: true > :merb_root: /var/www/apps/upload_merb/current > :merb_config: /var/www/apps/upload_merb/current/dist/conf/merb.yml > :environment: production > > > Starting merb drb server on port: 32323 > Starting merb server on port: 6000 > Starting merb server on port: 6001 > ====================================================== > > It's "production" environment, and the showed "allow_reloading" / > "cache_templates" information is wrong. > > I dig into the merb codes, find that merb show options information in > merb_config(...), but some > options(:allow_reloading/show_error/cache_templates) are likely to be > changed in run(...) according the value of environment. > > So it's better to show option informations in run(...) after all > options have been decided. > > > Thanks > DavidLin > _______________________________________________ > Merb-devel mailing list > Merb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/merb-devel -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273)