Skip to content

Commit

Permalink
This fix makes response header accessable throught codition object
Browse files Browse the repository at this point in the history
Consider this example:
```
(defun handle-condition (cond)
  (format t "Response Headers Should Not Be Nil: ~A~%" (dex:response-headers cond))
  (dex:ignore-and-continue cond))


(handler-bind ((dex:http-request-failed #'handle-condition))
  (dex:get "http://httpbin.org/status/418" :verbose 1))
```

It will print "Response Headers Should Not Be Nil: NIL" without this fix and will output response headers when patch applied.

Don't know how to run tests, probably this should be added to the testsuite.
  • Loading branch information
svetlyak40wt committed Aug 15, 2016
1 parent e5b756d commit 559e43d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/usocket.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@
(when (<= 400 status)
(http-request-failed-with-restarts status
:body body
:headers headers
:headers response-headers
:uri uri))
(return-from request
(values body
Expand Down

0 comments on commit 559e43d

Please sign in to comment.