aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorhttp://smcv.pseudorandom.co.uk/ <smcv@web>2014-02-22 19:24:58 -0400
committeradmin <admin@branchable.com>2014-02-22 19:24:58 -0400
commit49647b51d04ea704ff00f872d2beb327595fdc6a (patch)
treeb79856f1385316f0dc32b3255f1d2227f1836bbb /doc
parentb6a327d99339bde3638ef25ebcf4e1f49f7545b0 (diff)
downloadikiwiki-49647b51d04ea704ff00f872d2beb327595fdc6a.tar
ikiwiki-49647b51d04ea704ff00f872d2beb327595fdc6a.tar.gz
review
Diffstat (limited to 'doc')
-rw-r--r--doc/bugs/can__39__t_upload_a_simple_png_image:_prohibited_by_allowed__95__attachments___40__file_MIME_type_is_application__47__octet-stream....mdwn17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/bugs/can__39__t_upload_a_simple_png_image:_prohibited_by_allowed__95__attachments___40__file_MIME_type_is_application__47__octet-stream....mdwn b/doc/bugs/can__39__t_upload_a_simple_png_image:_prohibited_by_allowed__95__attachments___40__file_MIME_type_is_application__47__octet-stream....mdwn
index 1f893b980..b55605245 100644
--- a/doc/bugs/can__39__t_upload_a_simple_png_image:_prohibited_by_allowed__95__attachments___40__file_MIME_type_is_application__47__octet-stream....mdwn
+++ b/doc/bugs/can__39__t_upload_a_simple_png_image:_prohibited_by_allowed__95__attachments___40__file_MIME_type_is_application__47__octet-stream....mdwn
@@ -55,3 +55,20 @@ Weird... --[[anarcat]]
> > I have a stupid [[patch]] in my git repo which just appends a semicolon to the `::magic()` output, but maybe this should be done in another way...
> >
> > --[[anarcat]]
+
+> > > If the regex match isn't necessary and it's just about deleting the
+> > > parameters, I think I'd prefer something like
+> > >
+> > > if (! defined $mimetype) {
+> > > ...
+> > > }
+> > > $mimetype =~ s/;.*//;
+> > >
+> > > but I'd be hesitant to do that without knowing why Joey implemented it
+> > > the way it is. If it's about catching a result from file(1) that
+> > > is not, in fact, a MIME type at all (empty string or error message
+> > > or something), maybe something more like this?
+> > >
+> > > if (! defined $mimetype || $mimetype !~ s{[-\w]+/[-\w]+(?:;.*)?}{})
+> > >
+> > > (or whatever the allowed characters in MIME types are). --[[smcv]]