mod_ruby + amrita = strange behaviour
dodo <[email protected]> Sun, 5 Dec 2004 00:51:20 +0100
| Newsgroups | gmane.comp.apache.mod-ruby |
|---|---|
| Organization | Darkwired Technical Facility |
| Message-ID | <[email protected]> |
Hello,
I'm doing a little test project. A website that lists proxies.
I use mod_ruby in combination with Amrita template parser.
The method below allows me to format my datastructure into a table:
60 def test()
61 # the actual data
62 pls = ProxyListStorage.new("data/proxies_checked.marshal")
63 proxies = pls.inputMarshal()
64 proxies = proxies.slice(1, 21)
65 data = pls.outputAmrita(proxies)
66 data = { :list => data }
67 tf = TemplateFile.new("content/proxylist.tpl.xhtml")
68 tf.prettyprint = true
69 tf.asxml = true
70 tf.expand($stdout, data)
71 end
When I run this script with the commandline ruby interpreter, its OK.
However, when I use my browser, the following thing happens:
The first time the table-size is changed (ex, proxies.slice(2, 19)).
I first get no output, then I get this output:
#<Proxy:0x8817a2c>
#<Proxy:0x88179c8>
#<Proxy:0x8817964>
#<Proxy:0x8817900>
#<Proxy:0x881789c>
... (times 19-2)
Then another reload, and I get the right content.
This only happens when I change the slice()
Anyone who has seen this before somewhere?
dodo