Coder Social home page Coder Social logo

Comments (3)

jnc-nj avatar jnc-nj commented on July 16, 2024

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!

from dexador.

fukamachi avatar fukamachi commented on July 16, 2024

This is caused with the recent Lack's bug. See fukamachi/lack#39 and try it with the latest Lack.

from dexador.

jnc-nj avatar jnc-nj commented on July 16, 2024

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!

from dexador.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.