sdaugherty / mediawiki-page-attachment

Automatically exported from code.google.com/p/mediawiki-page-attachment
Other
0 stars 0 forks source link

Downloads are garbled: blank line at beginning #71

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What is the expected output? What do you see instead?

I noticed that downloading an attachment through this extension will cause my 
web browser not to open the correct program... I thought the problem is that 
the extension doesn't set the correct mime type.  However, after storing the 
file and looking at it, I noticed that it contains a blank link at the 
beginning... i.e. the download file is garbled: it consists of a blank line, 
followed by the content.  when I remove the blank line from the stored file, I 
can open it.

What steps will reproduce the problem?

An example is here: 
http://sandbox.spdx.org/index.php/Technical_Team/Minutes/2011-03-08

When I download Spdx-model-v4.png, I get a PNG that contains a blank line at 
the start.

When I go to http://sandbox.spdx.org/index.php/File:Spdx-model-v4.png 
everything is fine, so this is a problem with the PageAttachment extension.

(I couldn't figure out how to enable non-logged in users to download files; if 
you want an account to test, let me know)

  PageAttachment version  : 3.1.0
  MediaWiki version       : 1.19
  PHP version             : 5.3.3
  Database name           : MySQL
  Database version        : 5.1.66
  Operating System name   : Debian GNU/Linux
  Operating System version: 6.0.7

Original issue reported on code.google.com by t...@cyrius.com on 11 Apr 2013 at 11:17

GoogleCodeExporter commented 8 years ago
Hi tbm:

Is basic or digest authentication enabled?

Sincerely yours,

Aldrin

Original comment by Aldrin.Baroi@gmail.com on 12 Apr 2013 at 5:41

GoogleCodeExporter commented 8 years ago
auth_basic was enabled in Apache but not used.  I just disabled it but get the 
same problem.

Original comment by t...@cyrius.com on 12 Apr 2013 at 1:29

GoogleCodeExporter commented 8 years ago
Hi tbm:

It is possible that your hosting system do not allow accessing local file 
system through "http" which the only option available currently.  Will be 
updating code to handle different type of Mediawiki repositories (local, 
remote, shared, Swift) etc.  See issue# 75

Original comment by Aldrin.Baroi@gmail.com on 15 May 2013 at 6:41

GoogleCodeExporter commented 8 years ago

Original comment by Aldrin.Baroi@gmail.com on 15 May 2013 at 6:47

GoogleCodeExporter commented 8 years ago
Hmm, I'm not sure.  I believe http access for the host was allowed on in my 
sandbox. When I login to the server and fetch 
http://sandbox.spdx.org/images/Spdx-model-v4.png with wget I get the correct 
file.

Anyway, I guess I'll re-try once you have implemented local access.

Original comment by t...@cyrius.com on 15 May 2013 at 7:47

GoogleCodeExporter commented 8 years ago
In favor of new code (See issue# 75) being developed to support multiple file 
repositories, will not fix this code and will remove it in next release. The 
new code is more or less working and do not require and additional check for 
security settings and local access will work with no issues.

Original comment by Aldrin.Baroi@gmail.com on 14 Aug 2013 at 8:26