Skip to content

Commit 507cede

Browse files
author
Richard Jones
committed
merge from HEAD
1 parent 8e5acaf commit 507cede

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Fixed:
1414
- fixed IE double-submit when it shouldn't (sf bug 842254)
1515
- fixed check for JS pop()/push() to make more general (sf bug 877504)
1616
- fix re-enabling queries (sf bug 861940)
17+
- use supplied content-type on file uploads before trying filename)
1718

1819

1920
2003-12-17 0.6.4

roundup/cgi/client.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: client.py,v 1.130.2.6 2004-01-17 02:48:00 richard Exp $
1+
# $Id: client.py,v 1.130.2.7 2004-01-21 04:54:27 richard Exp $
22

33
__doc__ = """
44
WWW request handler (also used in the stand-alone server).
@@ -1866,8 +1866,11 @@ def parsePropsFromForm(self, num_re=re.compile('^\d+$')):
18661866
props['name'] = fn
18671867
# use this info as the type/filename properties
18681868
if propdef.has_key('type'):
1869-
props['type'] = mimetypes.guess_type(fn)[0]
1870-
if not props['type']:
1869+
if hasattr(value, 'type') and value.type:
1870+
props['type'] = value.type
1871+
elif mimetypes.guess_type(fn)[0]:
1872+
props['type'] = mimetypes.guess_type(fn)[0]
1873+
else:
18711874
props['type'] = "application/octet-stream"
18721875
# finally, read the content
18731876
value = value.value

0 commit comments

Comments
 (0)