fukamachi / woo

A fast non-blocking HTTP server on top of libev
http://ultra.wikia.com/wiki/Woo_(kaiju)
MIT License
1.27k stars 96 forks source link

QURI.ERROR:URL-DECODING-ERROR #72

Closed transformator closed 4 years ago

transformator commented 6 years ago

Hi!

SERVER> server

S(CLACK.HANDLER::HANDLER

:SERVER :WOO :ACCEPTOR #<SB-THREAD:THREAD "clack-handler-woo" RUNNING {102E4C3983}>)

curl "http://127.0.0.1:2222/local:1%love"

Callback Error: the message-complete callback failed Condition QURI.ERROR:URL-DECODING-ERROR was signalled. [Condition of type FAST-HTTP.ERROR:CB-MESSAGE-COMPLETE]

Restarts: 0: [ABORT] abort thread (#<THREAD "clack-handler-woo" RUNNING {102E4C3983}>)

Backtrace: 0: ((FLET "H0" :IN FAST-HTTP.PARSER::PARSE-BODY) #) 1: (SB-KERNEL::%SIGNAL #<QURI.ERROR:URL-DECODING-ERROR {102F43A173}>) 2: (ERROR QURI.ERROR:URL-DECODING-ERROR) 3: (QURI.DECODE::HEXDIGIT-TO-INTEGER #) 4: (URL-DECODE "local:1%love" :ENCODING # :START # :END # :LENIENT T) 5: (WOO::HANDLE-REQUEST # #S(WOO.EV.SOCKET:SOCKET :WATCHERS #(#.(SB-SYS:INT-SAP #X7FFFEC011A60) #.(SB-SYS:INT-SAP #X7FFFEC011A20) #.(SB-SYS:INT-SAP #X7FFFEC0119E0)) :LAST-ACTIVITY 1.. 6: ((LAMBDA NIL :IN WOO::SETUP-PARSER)) 7: ((LAMBDA (FAST-HTTP.HTTP:HTTP) :IN FAST-HTTP:MAKE-PARSER) #) 8: (FAST-HTTP.PARSER::PARSE-BODY #S(FAST-HTTP.HTTP:HTTP-REQUEST :METHOD :GET :MAJOR-VERSION 1 :MINOR-VERSION 1 :STATUS 0 :CONTENT-LENGTH NIL :CHUNKED-P NIL ...) # #<unavailable argu.. 9: (FAST-HTTP.PARSER:PARSE-REQUEST #S(FAST-HTTP.HTTP:HTTP-REQUEST :METHOD :GET :MAJOR-VERSION 1 :MINOR-VERSION 1 :STATUS 0 :CONTENT-LENGTH NIL :CHUNKED-P NIL ...) #S(FAST-HTTP.PARSER:CALLBACKS :MESSAGE-B.. 10: ((LAMBDA (FAST-HTTP::DATA &KEY :START :END) :IN FAST-HTTP:MAKE-PARSER) #(71 69 84 32 47 208 ...) :START # :END #) 11: (WOO::READ-CB #S(WOO.EV.SOCKET:SOCKET :WATCHERS #(#.(SB-SYS:INT-SAP #X7FFFEC011A60) #.(SB-SYS:INT-SAP #X7FFFEC011A20) #.(SB-SYS:INT-SAP #X7FFFEC0119E0)) :LAST-ACTIVITY 1.5263082135862458e9 :FD 47 :REM.. 12: ((LAMBDA (WOO.EV.TCP::EVLOOP WOO.EV.TCP::WATCHER WOO.EV.TCP::EVENTS) :IN "/home/sun/quicklisp/dists/quicklisp/software/woo-20170830-git/src/ev/tcp.lisp") # # #<u.. 13: ((LAMBDA (SB-ALIEN::ARGS-POINTER SB-ALIEN::RESULT-POINTER FUNCTION) :IN "/home/sun/quicklisp/dists/quicklisp/software/woo-20170830-git/src/ev/socket.lisp") # #<unavailable argume.. 14: ("foreign function: funcall_alien_callback") 15: ("foreign function: callback_wrapper_trampoline") 16: ("foreign function: #x201014CC") 17: ("foreign function: #x406832E919B63900") 18: ("foreign function: ev_run") 19: (LEV:EV-RUN # #)

please add an error handler. thanks.

transformator commented 6 years ago

patch -> https://bpaste.net/show/9127fa9978ed

transformator commented 6 years ago

https://bpaste.net/show/6c409202bafa

gibsonf1 commented 5 years ago

I'm getting this error which I think might be the same issue: woo.ev.tcp - Unexpected error (Code: 104)

PS: woo is incredible, I'm running woo behind haproxy here and its fast: https://graphmetrix.com

hjudt commented 5 years ago

I am also getting Unexpected error Code 104. Could you please re-upload the patch so we can test it? It is already gone from bpaste.net.

fukamachi commented 5 years ago

Sorry for the delay. I'll try to reproduce this in a few days.

fukamachi commented 5 years ago

As I've fixed the error in QURI, the error disappears now. However, error handling in Woo-side could be still prefer.