tcl-rivet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Massimo Manghi <>
Subject manipulating http headers with rivet
Date Mon, 19 Feb 2007 11:25:00 GMT

I posted a question about the 'headers set' command last week
which went unanswered. Although this is against the netiquette
I'm so helpless about this problem that I try again (David, if
you can pay attention to this I promise I rework and extend
another 2 sections of the docs ;-))

I'm not able to get the headers set the way I needed.
The problem is simple: 'headers set ' commands seems to have
no effect on the actual headers. I looked at the source code
for this command but it didn't help: 
TclWeb_HeaderSet(char *header, char *val, TclWebRequest *req)
is simply a wrapper of the proper call to the apache server
and it gave me no clue on how to use it.

I wrote a trivial  rvt  page for test

        headers set Content-Type application/pdf
        set poster [open Poster.pdf r]
        fconfigure $poster -translation binary
        set pdf    [read $poster]
        close $poster

        puts $pdf

the actual headers sent over by the server are

~/www> HEAD http://localhost/~manghi/serveposter.rvt
200 OK
Connection: close
Date: Mon, 19 Feb 2007 11:11:12 GMT
Server: Apache/1.3.34 (Debian) Rivet
Content-Type: text/html; charset=iso-8859-1
Client-Date: Mon, 19 Feb 2007 11:11:12 GMT
Client-Response-Num: 1

which gets the browser confused about what to do with
the resource.

-- Massimo Manghi 

-- Dipartimento di Biologia Evolutiva e Funzionale 
-- Università degli Studi di Parma
-- Parco Area delle Scienze 11A - 43100 Parma

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message