Commit Graph

6892 Commits (b386fd2185d2444b5dea4133646ec73e9867edb3)

Author SHA1 Message Date
Joey Hess 03d7f84f28 Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info
Conflicts:

	doc/bugs/attachment:_failed_to_get_filehandle.mdwn
2008-07-08 18:12:33 -04:00
Joey Hess ad02f69836 attachment: Support perl 5.8's buggy version of CGI.pm.
This is truely horribly disgusting. CGI::tmpFileName, in current perls, is
an undocumented function (which should be a clue..) that takes the original
filename of an uploaded attachment, and returns the name of the tempfile
that CGI has stored it in.

In old perls, though, CGI::tmpFileName does not take a filename. It takes
a key from the object's {'.tmpfiles'} hash. This key is something
crazy like '*Fh::fh00001group' -- apparently the stringification of a
filehandle object.

Just to add to the fun, tmpFileName doesn't take the key, it expects a
refernce to the key. Argh?!

But the fun doesn't stop there, because in perl 5.8, CGI.pm is also broken
in two other ways. The upload() method is supposed to return a filehandle
to the temp file. It doesn't. The param() method is supposed to return
a filehandle to the temp file, that stringifies to the original filename.
It returns just the original filename, no filehandle.

Combine all these bugs, and you end up with this disgusting commit. Since
I have no way to get the filehandle, I *need* to get the tempfile name.
If I had the filehandle, I could probably pass it into tmpFileName, and
it might strigify to the right key name. But I don't, so the only way to
determine the key is to grub through the .tmpfiles hash ourselves.

And finally, one the temp file name is discovered, a filehandle can finally
be obtained by (re)opening it.

I recommend that this commit be reverted when perl 5.8 is a mercifully
faded memory.

I'm really, really, really glad I'm actually being paid for working on
this right now!
2008-07-08 18:10:53 -04:00
Joey Hess 2e5785907d explicitly set form type to multipart
This is the default in unstable's formbuilder, but not in stable's,
and CGI multipart is needed for fule uploads.
2008-07-08 17:18:02 -04:00
Joey Hess fbd9865232 Include ikiwiki.setup in examples in the debian package. 2008-07-08 17:08:00 -04:00
Joey Hess 9e51b2ccb5 web commit by http://ptecza.myopenid.com/: * Thanks! 2008-07-08 17:05:33 -04:00
Joey Hess 905d99e248 web commit by HenrikBrixAndersen: This happens on FreeBSD as well 2008-07-08 17:04:28 -04:00
Joey Hess 4a86457750 reproduced 2008-07-08 16:59:21 -04:00
Joey Hess f529518948 response 2008-07-08 16:21:17 -04:00
Joey Hess 22839215fb check for tempfile being empty 2008-07-08 16:21:01 -04:00
Joey Hess 5a9faa0aff rm 2008-07-08 16:18:11 -04:00
Joey Hess 8cac2ac23e web commit by http://ptecza.myopenid.com/: * The bug still occurs 2008-07-08 16:11:18 -04:00
Joey Hess ac69ab522c add dist-bugs 2008-07-08 14:18:09 -04:00
Joey Hess dd8be0ab32 merge 2008-07-08 13:47:02 -04:00
Joey Hess e0855f84d3 response 2008-07-08 13:46:01 -04:00
Joey Hess b2d983c670 web commit by mrled 2008-07-08 13:16:11 -04:00
Joey Hess 23e95143b8 web commit by mrled 2008-07-08 13:08:46 -04:00
Joey Hess d7380c1afa web commit by mrled 2008-07-08 13:04:23 -04:00
Joey Hess 03639ff4d0 web commit by mrled 2008-07-08 13:03:46 -04:00
Joey Hess 1f192b330e web commit by mrled 2008-07-08 13:02:25 -04:00
Joey Hess 6f3c980e2b undef $fh before opening 2008-07-08 12:16:36 -04:00
Joey Hess 6fc21e9d3d web commit by http://ptecza.myopenid.com/: * Still no success 2008-07-08 11:56:31 -04:00
Joey Hess bae7306828 response 2008-07-08 11:47:03 -04:00
Joey Hess 66f35e30dc another try at dealing with CGI.pm problem
open the temp file if all attempts to get a fd fail
2008-07-08 11:25:30 -04:00
Joey Hess 5ccd0cb518 web commit by http://ptecza.myopenid.com/: * Debugging again 2008-07-08 11:15:48 -04:00
Joey Hess fd6ebaeee7 possible fix 2008-07-08 10:43:45 -04:00
Joey Hess 71f10579c0 attachment: Support old versions of CGI.pm that lack an upload method. 2008-07-08 10:42:58 -04:00
Joey Hess 0ffe0872c1 web commit by http://ptecza.myopenid.com/: * Next debbuging 2008-07-08 10:24:24 -04:00
Joey Hess fac6743cad new thing to try 2008-07-08 10:16:29 -04:00
Joey Hess 0c9a504948 fix fix 2008-07-08 10:05:57 -04:00
Joey Hess f8a86765d2 close 2008-07-08 10:04:43 -04:00
Joey Hess e25c3a0a7c Fix a bug with links to pages whose names contained colons.
So the problem is that ikiwiki would generate a relative link like
href="colon:problem", which web browsers treat as being in the "colon:"
uri scheme.

The best fix seems to be to make url beautification fix this, by slapping
a "./" in front.
2008-07-08 10:03:55 -04:00
Joey Hess 42dcf37016 web commit by http://ptecza.myopenid.com/: * Missing Apache2 version 2008-07-08 10:00:48 -04:00
Joey Hess 99113e50ef web commit by http://ptecza.myopenid.com/: * Response 2008-07-08 09:58:33 -04:00
Joey Hess 04319b030c split out separate bug 2008-07-08 09:49:29 -04:00
Joey Hess 7e16fa3a1e response 2008-07-08 09:46:29 -04:00
Joey Hess f156308aef attachment: Fix an uninitialised value warning when editing a page that currently has no attachments. 2008-07-08 09:40:46 -04:00
Joey Hess eb4a6fb01a Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info 2008-07-08 09:37:58 -04:00
Joey Hess 67e4a21bd6 web commit by http://jcflack.myopenid.com/ 2008-07-08 09:29:19 -04:00
Joey Hess db77e342fa web commit by http://ptecza.myopenid.com/: * Problem with colon in report page name 2008-07-08 06:42:33 -04:00
Joey Hess 7977fe382a web commit by http://ptecza.myopenid.com/: * Problem with uploading attachments 2008-07-08 06:29:20 -04:00
Joey Hess a3f6385448 web commit by http://ptecza.myopenid.com/: * Thanks! 2008-07-08 04:27:12 -04:00
Joey Hess d1d0c6667d add an interesting ikiwiki site I stumbled across 2008-07-08 02:42:12 -04:00
Joey Hess ff5ebd4b8d test 2008-07-07 19:15:14 -04:00
Joey Hess 611bf8edb6 response 2008-07-07 16:41:52 -04:00
Joey Hess 9de2ebb983 move to todo 2008-07-07 16:40:48 -04:00
Joey Hess 488f92426d clarify how an item is wishlisted 2008-07-07 16:40:28 -04:00
Joey Hess b5eaf7bff5 undo wishlist changes
You don't want to post new wishlist items, really, as they're lower
priority than just todo items. :-) Anyway, I want to keep wishlist and
todos both under todo/ so that they can easily be changed from one state to
another. And the inline caused items to be created under wishlist/ , but
didn't actually inline them.
2008-07-07 16:38:19 -04:00
Joey Hess d5ad2c6522 web commit by http://dmarti.myopenid.com/ 2008-07-07 15:15:35 -04:00
Joey Hess b37a98c207 web commit by http://www.openidfrance.fr/beaufils 2008-07-07 15:11:57 -04:00
Joey Hess dd8712fe2a web commit by http://dmarti.myopenid.com/ 2008-07-07 15:03:57 -04:00