On 28.07.2009, at 17:06, sokai wrote:
> today I had some trouble with the Collections extension and opening
> the generated PDFs...

What HTTP headers are returned when you issue a download request? If  
you have the curl command line tool installed, you can inspect them  
with this command:

$ curl -D - -o test.pdf 
'http://en.wikipedia.org/w/index.php?title=Special:Book/download/&collection_id=676b0f2f04f62f3e&writer=rl'

(replace the URL with the one from a download link in your wiki)

The response header is written to stdout and should at least contain
* HTTP/1.0 200 OK
* Content-Type: application/pdf
* Content-Disposition: inline; filename=collection.pdf
and a sensible value for Content-Length.

> (Strange: other PDF files on the
> internet where opened with Adobe Acrobat inline the browser window...)

The "Content-Disposition: inline" part should result in the PDF being  
opened in the browser if a plugin is available ("Content-Disposition:  
attachment" would trigger a normal download instead).

> But: FF opens the URL of the generated document in the window and
> shows a lot of 'cryptically text' - it seems that's the source-code of
> the PDF file...

This indicates that the Content-Type header is not returned as  
application/pdf but maybe either not at all or as text/plain or text/ 
html or something like that.

Does downloading Collection extension PDFs/ODFs work on other wikis  
for you, e.g. on Wikipedia?

-- Johannes


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"mwlib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/mwlib?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to