Skip to content

Commit

Permalink
Merge pull request #53 from GPPassos/read-response-fix
Browse files Browse the repository at this point in the history
non-empty bodies in responses w/o declared body length (solves #52)
  • Loading branch information
fukamachi committed Jul 30, 2018
2 parents 5a61e07 + fea5a68 commit 72bfe93
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/backend/usocket.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,11 @@
(let ((buf (make-array content-length :element-type '(unsigned-byte 8))))
(read-sequence buf stream)
(setq body buf)))
((or (not transfer-encoding-p)
(let ((status (http-status http)))
(or (= status 100) ;; Continue
(= status 101) ;; Switching Protocols
(= status 204) ;; No Content
(= status 304)))) ;; Not Modified
((let ((status (http-status http)))
(or (= status 100) ;; Continue
(= status 101) ;; Switching Protocols
(= status 204) ;; No Content
(= status 304))) ;; Not Modified
(setq body +empty-body+))
(T
(setq body-data (make-output-buffer))
Expand Down

0 comments on commit 72bfe93

Please sign in to comment.