Package: araneida Version: 0.90.1-dfsg-1 Severity: normal Tags: patch When I tried to receive big POST requests in multipart/form-data MIME type, araneida failed because it tried to parse the body. The following patch made it work:
Index: Source/daemon.lisp =================================================================== --- Source.orig/daemon.lisp +++ Source/daemon.lisp @@ -36,6 +36,11 @@ (or (and protocol (parse-protocol-version protocol)) 0.9)) (content-length (parse-integer (or (header-value :content-length headers) "0"))) + (content-type (header-value :content-type headers)) + (form-data-mime-type "multipart/form-data") + (form-data-p (and content-type + (>= (length content-type) (length form-data-mime-type)) + (equal form-data-mime-type (subseq (header-value :content-type headers) 0 (length form-data-mime-type))))) (body (and (> content-length 0) ;; The make-array form sounds good but breaks on ;; streams (like Allegro's multivalent sockets) @@ -50,7 +55,7 @@ (len (and (> content-length 0) (read-sequence body stream))) #+lispworks - (parsed-body (if body (parse-body (map 'string + (parsed-body (if (and body (not form-data-p)) (parse-body (map 'string ;; for some reason lispworks wants an array of code characters ;; according to Bob Hutchinson (hutch at recursive.ca) ;; -- Alan Shields [14 November 2005] @@ -58,7 +63,7 @@ body) body '(#\&) len) nil)) #-lispworks - (parsed-body (if body (parse-body body '(#\&) len) nil)) + (parsed-body (if (and body (not form-data-p)) (parse-body body '(#\&) len) nil)) (url (merge-url ;; it may be argued that we're going to hell for this, but ;; (header-value :host) may in fact be host:port and I'm -- System Information: Debian Release: testing/unstable APT prefers testing APT policy: (990, 'testing'), (501, 'stable'), (500, 'unstable'), (500, 'stable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.17-2-k7 Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) Versions of packages araneida depends on: ii cl-net-telent-date 1:0.4.1-2 Common Lisp utilities for printing ii cl-split-sequence 20050802-1 Common Lisp package split a sequen ii cl-utilities 1.2.4-1 a Common Lisp library of common fu Versions of packages araneida recommends: ii apache2 2.0.55-4.1 next generation, scalable, extenda ii apache2-mpm-prefork [apache 2.0.55-4.1 traditional model for Apache2 ii sbcl 1:0.9.16.0-1 A Common Lisp compiler and develop -- no debconf information -- [EMAIL PROTECTED] OpenPGP 0xD9D50D8A
signature.asc
Description: Digital signature