git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: html page display via cgit

From
LHLars Hjemli <hjemli@gmail.com>
Date
Sep 1, 2010, 12:45 UTC
Message-ID
<AANLkTi=yEqrkfiY84qVrvJcaBjcU-_+U7tH5ki3h9J3x@mail.gmail.com>
In-Reply-To
<AANLkTimucGi-7QdxbP5iLs0h5=VWW55GCxug51V584UA@mail.gmail.com>
On Wed, Sep 1, 2010 at 14:19, Shivdas Gujare <shivdas.tech@gmail.com> wrote:
Show 15 quoted lines
> On Wed, Sep 1, 2010 at 3:53 PM, Stefan Naewe
> <stefan.naewe@atlas-elektronik.com> wrote:
>> Set this in /etc/cgitrc
>>
>> mimetype.gif=image/gif
>> mimetype.html=text/html
>> mimetype.jpg=image/jpeg
>> mimetype.jpeg=image/jpeg
>> mimetype.pdf=application/pdf
>> mimetype.png=image/png
>> mimetype.svg=image/svg+xml
>>
>
> I did tried this, but it didn't made any difference on showing html
> pages.

What cgit-version are you running? This option was added in cgit-0.8.3 (2009-09-13).

If your cgit has support for mimetype options, you probably have caching enabled, i.e. you're watching the old output (including Content-Type header).

> Does this work like adding a line "
> mimetype.pdf=application/pdf" to /etc/cgitrc allows me
> to open a pdf via cgit interface in browser?
Yes, the pdf will be displayed in your browser if your browser supports pdfs.
-- 
larsh
Previous: Shivdas GujareNext: Stefan Naewe
Message 8 of 9 in “html page display via cgit”
  1. Shivdas GujareSep 1, 2010
  2. Ævar Arnfjörð BjarmasonSep 1, 2010
  3. Joshua JuranSep 1, 2010
  4. Ævar Arnfjörð BjarmasonSep 1, 2010
  5. Joshua JuranSep 1, 2010
  6. Stefan NaeweSep 1, 2010
  7. Shivdas GujareSep 1, 2010
  8. Lars HjemliSep 1, 2010
  9. Stefan NaeweSep 2, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.