Description

There is a problem about attachment action. When I want to upload the attach file, its page will jump to the original page and the file dosen't upload. Its problem dosen't show error message.

Steps to reproduce

  1. I create a page name CCC
  2. Perform the AttachFile action. So, the page is ccc?action=AttachFile

  3. Upload the 測試test.txt file. File size of 測試test.txt is 337KB.
  4. This AttachFile page will jump to CCC page, and no file can upload.

Details

MoinMoin Version

1.5.0rc

OS and Version

Windows2000

Python Version

2.4

Server Setup

apache

Server Details

CannotAttach.txt

Workaround

I maybe have found the problem. Please try this: win32binary.patch and report back if it solved the problem.

Discussion

/!\ Obviously this bug report intermixes multiple problems:

Please provide more details, e.g. about browser and version you use.

Please try with same browser in this wiki.

Please try with a file with ASCII-only filename.


I think this is related to DownloadingAttachmentsFromStandaloneServerWithFirefox, something with the CGI HEADER handling.

Rene Aguirre, Jan-13-05



The line that is failing in wikiaction.py is:

from MoinMoin.converter.text_html_text_x_moin import convert 

This would seem to indicate that the install is broken. You could try running Python interactively, and then type just that same line in and see if it works. Also I've noticed that none of the moin __init__.py files define an __all__ variable. This could cause import problems in some python setups, especially since in this case MoinMoin.converter has not been previously imported first. -- DeronMeranda 2006-01-13 18:08:28



I just tried Python 2.3.5 and still have the same problems. --- Jonatan Antoni 2006-01-25 10:13:28

Now I tried moin-1.3.5, there are the problems as well! --- Jonatan Antoni 2006-01-25 10:32:28

/!\ Please show the log file entries of the web server log -- ReimarBauer 2006-01-25 09:50:10

The patch for request.py works fine, thx :) --- Jonatan Antoni 2006-01-30 10:30:28


I also had the same problem...this is my system spec : python 2.4, moin 1.5 XP pro SP 1, and both apache 2.053 & 2.055....

note : i am using ApacheOnWin32 installation Guide..no other guide... 2006-01-25 09:50:10


After a bit of experimenting (with 1.5.0/1.5.1, Apache 2.0.55, XP Prof.) I found that the bug is specific for Apache/cgi setups. There is no such problem with Apache/modpython. The Python version (2.3.5/2.4.2) or the browser (IE/Mozilla) do not matter. There are no errors logged to Apache-log or moin's log. The upload just does not happen. -- DavidLinke


I have been having this same issue where uploading binary files would silently fail. I am using Apache/2.0.54 (Win32) on Windows 2000 using CGI with Python 2.3.5. This has been happening since 1.5rc1 or so. The above patch fixed the problem for me. -- DavidHogue


Use the Win32Binary.patch to solve the patch, 100% successful. that help me easily...thank you...


This is really an old bug, but i still found it in MoinMoin v1.9.1, under Windows/Python v2.5/Apache v2.2.14! As far as i know, in MoinMoin v1.9.1, the request.py has been moved to MoinMoin/web/request.py, and the statements to call msvcrt.setmode cannot be found. Now i have to add msvcrt.setmode by myself. But what i wondering is that why don't you apply the Win32Binary.patch into very new version? Each time if I install or upgrade to a newer version, i have to apply this patch (and also some other patches) manually. What a terrible thing <:( -- -- JiZhou 2010-02-19 17:40:46



The patch also works on 1.9.3, here are the details:

   1     def __init__(self, environ, populate_request=True, shallow=False):
   2         try:
   3 
   4             if sys.platform == "win32":
   5                 import msvcrt
   6                 msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)
   7                 msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
   8 
   9             ResponseBase.__init__(self)
  10             RequestBase.__init__(self, environ, populate_request, shallow)
  11             self.href = Href(self.script_root or '/', self.charset)
  12             self.abs_href = Href(self.url_root, self.charset)
  13             self.headers = Headers([('Content-Type', 'text/html')])
  14             self.response = []
  15             self.status_code = 200
  16 
  17         except Exception, err:
  18             self.fail(err)

With this modifications I can now upload and embed attachments. -- AlejandroSaenz

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/AttachmentsDontWork (last edited 2010-10-19 16:56:29 by AlejandroSaenz)