fukamachi / dexador

A fast HTTP client for Common Lisp
http://ultra.wikia.com/wiki/Dexador
379 stars 41 forks source link

Restarts IGNORE-AND-CONTINUE and RETRY-REQUEST are broken after bee5f13 commit #175

Closed svetlyak40wt closed 5 months ago

svetlyak40wt commented 5 months ago

https://github.com/fukamachi/dexador/commit/bee5f13d658d042d6666ba58d2c559cfaf960e40#diff-c750a8a8d4c464f04f1487153c5674b703e223f05574f38ecc8520403f4e5c4a

This commit replaced :use of :dexador package and instead of

 (:use :cl
        #-windows #:dexador.backend.usocket
        #+windows #:dexador.backend.winhttp)

we now have:

(:use :cl)

Because of that IGNORE-AND-CONTINUE function, defined like this in dexador.lisp:

(defun ignore-and-continue (e)
  (let ((restart (find-restart 'ignore-and-continue e)))
    (when restart
      (invoke-restart restart))))

searches for a wrong restart name. Previosly symbol ignore-and-continue was taken from the dexador.backend.usocket.

How to reproduce an issue? Call this in the REPL:

(handler-bind ((dex:http-request-failed #'dex:ignore-and-continue))
                               (dex:get "https://httpbin.org/get/404"))

DEXADOR.ERROR:HTTP-REQUEST-NOT-FOUND error will be opened in the debugger.

Expected behaviour – function dex:get returned a response and 404 code as a second value.

svetlyak40wt commented 5 months ago

I've found RETRY-REQUEST is also broken because of the same reason.

svetlyak40wt commented 5 months ago

It would be nice to have some tests on the critical features.

fukamachi commented 5 months ago

Thank you for reporting. I'm working on it.

svetlyak40wt commented 5 months ago

Great! Thank you!!!