Skip to content
Browse files

Fix for 100-continue bug.

  • Loading branch information...
1 parent 54a06df commit 57be9afc157bf875c6cbe1d4609a24c9b08488e3 @gigamonkey committed
Showing with 6 additions and 4 deletions.
  1. +6 −4 http.lisp
View
10 http.lisp
@@ -408,7 +408,9 @@ by Chunga's read-http-headers method."
(when (member "100-continue" (split "\\s*,\\s*" expectations) :test #'equalp)
;; according to 14.20 in the RFC - we should actually
;; check if we have to respond with 417 here
- (write-simple-response stream +http-continue+)))
+ (let ((s (make-header-stream stream)))
+ (write-status-line s +http-continue+)
+ (write-line-crlf s ""))))
(values headers
(as-keyword request-method)
url-string
@@ -659,9 +661,9 @@ connection."
(defun write-simple-response (stream status-code &optional headers content)
(with-open-stream (s (make-header-stream stream))
- (write-status-line stream status-code)
- (write-headers stream headers)
- (write-line-crlf stream "")
+ (write-status-line s status-code)
+ (write-headers s headers)
+ (write-line-crlf s "")
(when content (write-line-crlf stream content))))
;; FIXME: technically a HEAD request SHOULD still have a

0 comments on commit 57be9af

Please sign in to comment.
Something went wrong with that request. Please try again.