paste.tuxfamily.org

Name
me
Scriptlanguage
Plain Text
Tabwidth
4
Date
03/06/2013 10:23:24 am
IP
91.121.98.105

luvit + keepalive + w3m = crash

  1. - checked with luvit 0.6.1 and git head
  2. - https://github.com/luvit/luvit/blob/master/examples/speed-http.lua
  3.  
  4. 1)
  5. $ luvit speed-http.lua
  6. http server listening on 8080
  7.  
  8. 2a)
  9. $ wget -q -O - http://127.0.0.1:8080
  10. Hello
  11. $ wget -q -O - http://127.0.0.1:8080
  12. Hello
  13.  
  14. http-server: no error
  15.  
  16. 2b)
  17. $ w3m -dump_both http://127.0.0.1:8080
  18. HTTP/1.1 200 OK
  19. Content-Length: 6
  20.  
  21. Hello
  22.  
  23. Server: crash !
  24.  
  25. /home/me/speed-http.lua:41: attempt to call method 'close' (a nil value)
  26. stack traceback:
  27.         /home/me/speed-http.lua:41: in function 'onRequest'
  28.         /home/me/speed-http.lua:72: in function </home/me/speed-http.lua:64>
  29.         [C]: in function 'execute'
  30.         /home/me/speed-http.lua:85: in function 'callback'
  31.         /usr/local/tools/64bits/luvit/0.6.1/lib/luvit/core.lua:213: in function 'emit'
  32.         /usr/local/tools/64bits/luvit/0.6.1/lib/luvit/net.lua:156: in function 'callback'
  33.         /usr/local/tools/64bits/luvit/0.6.1/lib/luvit/core.lua:213: in function 'emit'
  34.         /usr/local/tools/64bits/luvit/0.6.1/lib/luvit/uv.lua:50: in function </usr/local/tools/64bits/luvit/0.6.1/lib/luvit/uv.lua:49>
  35.         [C]: in function 'xpcall'
  36.         /usr/local/tools/64bits/luvit/0.6.1/lib/luvit/luvit.lua:193: in function </usr/local/tools/64bits/luvit/0.6.1/lib/luvit/luvit.lua:191>
  37.         [C]: in function 'run'
  38.         /usr/local/tools/64bits/luvit/0.6.1/lib/luvit/luvit.lua:340: in main chunk
  39.         [C]: in function 'require'
  40.         [string "    local path = require('uv_native').execpat..."]:1: in main chunk
  41. WARNING: forgot to close luv_tcp lhandle=0x41813c80 handle=0x92d880
  42. WARNING: forgot to close luv_tcp lhandle=0x4180fab0 handle=0x92d670
  43. WARNING: forgot to close luv_tty lhandle=0x41f63678 handle=0x929fd0
  44.  
  45.