google-code-backups / xinc

Automatically exported from code.google.com/p/xinc
0 stars 0 forks source link

Documentation plugin: content-type text/plain for php doc #169

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I add documentation, generated with doxygen, with:
<publishers>
<documentation file="${project.build.dir}/docs/apidocs/html/"
                                             alias="PHPDoc Documentation" 
                                             index="${project.build.dir}/docs
/apidocs/html/index.html"/>
</publishers>

I have link on it on dashboard:
http://bte.telme.kiev.ua:8082/api/documentation/get/file/Telme/1211198400/PHPDoc
%20Documentation/index.html

But when I click on it I get content-type "text/plain" and browser show
html source.

Original issue reported on code.google.com by kingo...@gmail.com on 19 May 2008 at 12:17

GoogleCodeExporter commented 8 years ago
I also added other documentation (for js) and it works fine

Original comment by kingo...@gmail.com on 19 May 2008 at 12:17

GoogleCodeExporter commented 8 years ago
I have found that function mime_content_type return 'text/plain' for
'/var/xinc/status/Telme/20080519/1211198400/documentation/PHPDoc
Documentation/index.html'. Please, use another way to found content-type of file
(magic, for example), or add *htm and *html in to exception, as it is done for
*tar.gz and *.css

Original comment by kingo...@gmail.com on 19 May 2008 at 12:35

GoogleCodeExporter commented 8 years ago
oleg@shoom-alpha:~$ sudo diff 
/usr/share/php/Xinc/Plugin/Repos/Api/Format/File.php
/usr/share/php/Xinc/Plugin/Repos/Api/Format/File.php~new  
69c69
<         if (preg_match('/.*?.tar\.gz/', $fileName) || 
---
>         if (preg_match('/.*?.tar\.gz$/', $fileName) || 
73c73
<         } else if (preg_match('/.*?\.css/', $fileName)) {
---
>         } else if (preg_match('/.*?\.css$/', $fileName)) {
74a75,76
>         } else if (preg_match('/.*?\.htm(l)?$/', $fileName)) {
>             return 'text/html';

Original comment by kingo...@gmail.com on 19 May 2008 at 12:38

GoogleCodeExporter commented 8 years ago
Issue 192 has been merged into this issue.

Original comment by opitz.al...@googlemail.com on 30 Sep 2011 at 10:19

GoogleCodeExporter commented 8 years ago

Original comment by opitz.al...@googlemail.com on 30 Sep 2011 at 10:20

GoogleCodeExporter commented 8 years ago
Changed in SVN

Original comment by opitz.al...@googlemail.com on 6 Apr 2012 at 8:35