Closed jnc-nj closed 5 years ago
Edit:
This is failing with
(defvar *app* (make-instance 'ningle:app))
(setf (ningle:route *app* "/")
"Welcome to ningle!")
(setf (ningle:route *app* "/login" :method :POST)
#'(lambda (params)
(if (authorize (cdr (assoc "username" params :test #'string=))
(cdr (assoc "password" params :test #'string=)))
"Authorized!"
"Failed...Try again.")))
(clack:clackup *app*)
from https://github.com/fukamachi/ningle
as well
* (dex:get "http://127.0.0.1:5000")
debugger invoked on a DEXADOR.ERROR:HTTP-REQUEST-BAD-REQUEST in thread
#<THREAD "main thread" RUNNING {10004F04C3}>:
An HTTP request to "http://127.0.0.1:5000" returned 400 bad request.
Bad Request
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [RETRY-REQUEST ] Retry the same request.
1: [IGNORE-AND-CONTINUE] Ignore the error and continue.
2: [ABORT ] Exit debugger, returning to top level.
(DEXADOR.ERROR:HTTP-REQUEST-FAILED 400 :BODY "Bad Request" :HEADERS #<HASH-TABLE :TEST EQUAL :COUNT 4 {1004337383}> :URI #<QURI.URI.HTTP:URI-HTTP http://127.0.0.1:5000> :METHOD :GET)
source: (ERROR (GETHASH STATUS *REQUEST-FAILED-ERROR* 'HTTP-REQUEST-FAILED)
:BODY BODY :STATUS STATUS :HEADERS HEADERS :URI URI :METHOD
METHOD)
0]
RUNTIME> (clack:clackup *app*)
Hunchentoot server is started.
Listening on 127.0.0.1:5000.
#S(CLACK.HANDLER::HANDLER
:SERVER :HUNCHENTOOT
:ACCEPTOR #<SB-THREAD:THREAD "clack-handler-hunchentoot" RUNNING
{1005804793}>)
[2019-09-18 16:53:32 [WARNING]] Warning while processing connection: The value of STRING is NIL, which is not of type STRING.
WARNING: The value of STRING is NIL, which is not of type STRING.
@fukamachi if you could look into this that would be great, thanks!
This is caused with the recent Lack's bug. See https://github.com/fukamachi/lack/issues/39 and try it with the latest Lack.
This is caused with the recent Lack's bug. See fukamachi/lack#39 and try it with the latest Lack.
Can confirm latest commit works, thanks!
Service
Curl
Drakma
Dexador