tcl-rivet-dev mailing list archives

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

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

<html><head>
<?
        headers set Content-Type application/pdf
?>
</head><body>
<?
        set poster [open Poster.pdf r]
        fconfigure $poster -translation binary
        set pdf    [read $poster]
        close $poster

        puts $pdf
?></body></html>

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-Peer: 127.0.0.1:80
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: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Mime
View raw message