anchor.diff:            (subseq line (1+ sp2)))))
   
   
  -;;; If it is non-NIL, the communication with the Docker daemon will be
  -;;; logged into the standard output.
  -(defvar *debug-protocol* nil)
  -
  -;;; Like `read-line', but it trims trailing CR and LF character as
  -;;; well as support for logging for debugging purposes.
  -(defun read-line* (stream &optional (eof-error-p t))
  -  (let ((line (string-right-trim *crlf* (read-line stream eof-error-p))))
  -    (when *debug-protocol*
  -      (format t "< ~a~%" line))
  -    line))
  -
  -;;; Like `format', but support logging for debugging purposes.
  -(defun format* (stream fmt &rest args)
  -  (when *debug-protocol*
  -    (format t "> ~?~%" fmt args))
  -  (apply #'format stream fmt args))
  -
  -;;; Write a CR and a LF character to STREAM.
  -(defun write-crlf (stream)
  -  (write-string *crlf* stream))
  -
  -(defun transfer-coding (headers)
  -  (let ((value (cdr (assoc :transfer-encoding headers))))
  -    (when value
  -      (subseq value 0 (or (position #\; value) (length value))))))
  -
  -
  -(defun request (url &key (method :get))
  +(defun request (url &key (method :get) content content-type)
     "Request a resource an Docker Remote API end-point.
   
   It returns a stream as primary value and a associative list of HTTP
  
positive.code:   (let ((stream (open-docker-stream)))
      ;; Request resource
      (format* stream "~a ~a HTTP/1.1" method url)
      (write-crlf stream)
      (write-crlf stream)
      (finish-output stream)
  
      ;; Process response
      (let ((status-line (read-line* stream)))
  
negative.code:              (docker-protocol-error-reason condition)))))
  
  
  ;;; If it is non-NIL, the communication with the Docker daemon will be
  ;;; logged into the standard output.
  (defvar *debug-protocol* nil)
  
  ;;; Like `read-line', but it trims trailing CR and LF character as
  ;;; well as support for logging for debugging purposes.
  (defun read-line* (stream &optional (eof-error-p t))
    (let ((line (string-right-trim *crlf* (read-line stream eof-error-p))))
      (when *debug-protocol*
        (format t "~a~%" line))
      line))
  
  ;;; Like `format', but support logging for debugging purposes.
  (defun format* (stream fmt &rest args)
    (when *debug-protocol*
      (format t "~?~%" fmt args))
    (apply #'format stream fmt args))
  
  ;;; Write a CR and a LF character to STREAM.
  (defun write-crlf (stream)
    (write-string *crlf* stream))
  
  (defun format-line* (stream fmt &rest args)
    (apply #'format* stream fmt args)
    (write-crlf stream))
  
  
  (defun transfer-coding (headers)
    (let ((value (cdr (assoc :transfer-encoding headers))))
      (when value
        (subseq value 0 (or (position #\; value) (length value))))))
  
  ;;; Check if STREAM is a input binary stream.
  (defun binary-input-stream-p (stream)
    (and (input-stream-p stream)
         (equal (stream-element-type stream) '(unsigned-byte 8))))
  
  (defun parse-status-line (line)
    ;; HTTP-Version SP Status-Code SP Reason-Phrase CRLF
    (let* ((sp1 (position #\space line))
  