Comment 177 for bug 25830

Revision history for this message
In , Joao-batista (joao-batista) wrote :

(In reply to comment #146)
> (In reply to comment #144)
> > I suppose there are ways to have a look at the data stream's content, right?
> > How is it done (pardon the newbie question)?
>
> For this example the interesting question is simply "what type is the server
> labeling this file as?" You can check like this:
>
> $ telnet fisica.fc.ul.pt 80
> HEAD http://fisica.fc.ul.pt/~jbatista/tstamp.c HTTP/1.1
> Host: fisica.fc.ul.pt
>
> HTTP/1.1 200 OK
> ...
> Content-Type: text/plain; charset=ISO-8859-1

Hi Chapman,

FYI my results are below. As you can see in both cases, for which I obtain
different results, the Content-Type is the same, namely text/x-csrc. It's even
more confusing because the PHP generated the (apparently) correct HTML: I got
"<a
href="temp/4587d12e416c8ab1e8ba9b11d9d47f7c/4587d12e416c8ab1e8ba9b11d9d47f7c.C"
target="_blank" type="text/x-c++src"><p align=center>Click here to view this
ROOT C++ script's source code</p></a>" as I would expect, but the problem persists.

HOWEVER, if I change the file's name to have an extension .txt instead of .C,
then it opens with no problem... :-o

For the first ("good") link:
--------------8<--------------8<--------------8<--------------8<--------------
$ telnet fisica 80
Trying 194.117.43.10...
Connected to fisica.fc.ul.pt.
Escape character is '^]'.
HEAD
/tikiwiki/temp/4587d12e416c8ab1e8ba9b11d9d47f7c/4587d12e416c8ab1e8ba9b11d9d47f7c.C
HTTP/0.9

HTTP/1.1 200 OK
Date: Thu, 08 Sep 2005 16:28:43 GMT
Server: Apache/1.3.33 (Debian GNU/Linux) PHP/4.3.10-15 mod_ssl/2.8.22 OpenSSL/0.9.7d
Last-Modified: Thu, 08 Sep 2005 07:51:20 GMT
ETag: "7c008-22-431fed78"
Accept-Ranges: bytes
Content-Length: 34
Connection: close
Content-Type: text/x-csrc

Connection closed by foreign host.
--------------8<--------------8<--------------8<--------------8<--------------

For the second ("bad") link:
--------------8<--------------8<--------------8<--------------8<--------------
$ telnet fisica 80
Trying 194.117.43.10...
Connected to fisica.fc.ul.pt.
Escape character is '^]'.
HEAD /~jbatista/tstamp.c HTTP/0.9

HTTP/1.1 200 OK
Date: Thu, 08 Sep 2005 16:29:03 GMT
Server: Apache/1.3.33 (Debian GNU/Linux) PHP/4.3.10-15 mod_ssl/2.8.22 OpenSSL/0.9.7d
Last-Modified: Thu, 08 Sep 2005 07:36:19 GMT
ETag: "1ec007-9f-431fe9f3"
Accept-Ranges: bytes
Content-Length: 159
Connection: close
Content-Type: text/x-csrc

Connection closed by foreign host.
$

--------------8<--------------8<--------------8<--------------8<--------------