httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oskari 'Okko' Ojala" <>
Subject [PATCH] to accept file uploads from Nokia Series 60 phones
Date Sun, 13 Apr 2003 11:37:25 GMT

Libapreq expects a "filename" parameter in multipart/form-data to detect 
a part is a file upload. Nokia Series 60 phones use "Filename" 
parameter (uppercase F) when uploading photos from the Photos 
application. This patch changes the libapreq to accept both "filename" 
and "Filename".

The Nokia Series 60 phones (Nokia 7650, Nokia 3650) include a 
built-in Photos application. The application has a "Send photo" feature 
to upload selected photos to the server using POST. The application uses 
"Filename" parameter in POST data. Because of this, the uploaded files 
don't show up as Apache::Upload objects in Perl.

The patch:

--- apache_request_rev1.23.c    Sun Apr 13 13:47:35 2003
+++ apache_request.c    Sun Apr 13 13:48:31 2003
@@ -568,7 +568,7 @@
                    if(strEQ(key, "name")) {
                        param = ap_getword_conf(r->pool, &pair);
-                   else if(strEQ(key, "filename")) {
+                   else if(strEQ(key, "filename") || strEQ(key, "Filename")) {
                        filename = ap_getword_conf(r->pool, &pair);


RFC 2388.

Nokia - Nokia 7650,4879,137,00.html

Nokia - Nokia 3650,4879,2273,00.html

Forum Nokia: Image Upload Server API v1.1,4879,2273,00.html, search for
	"Image Upload" using the header search bar, select second
	file "Image Upload Server API v1.1".

Latest revision of apache_request.c of libapreq

Other information:

RFC 2388 says:
   The original local file name may be supplied as well, either as a
   "filename" parameter either of the "content-disposition: form-data"
   header or, in the case of multiple files, in a "content-disposition:
   file" header of the subpart.

A caption of an IE POST with a file upload:

Content-Disposition: form-data; name="ImageData"; filename="Photo(21).jpg"
Content-Type: image/bmp

A caption of a Nokia Photo Upload POST with a file upload:

Content-Disposition: form-data; name="ImageData"; Filename="Photo(21).jpg"
Content-Type: image/jpeg

Own comments:
I don't know if this should be included in the main code or provided as 
an add-in patch elsewhere. You decide. :-)

	Oskari "Okko" Ojala


View raw message