I'm doing some tests with Live Code Server

This time I'm trying to understand the management of the header!

But first things first.
I created a simple html page and I sent it to the server.
The page will then run with Apache.
The returned header is this:
###############################################################
HTTP Status Code HTTP/1.1 200 OK
Cache-Control max-age=0, no-cache, no-store, must-revalidate
Expires Tue, 28 Jun 2016 10:10:05 GMT
Last-Modified Tue, 28 Jun 2016 10:09:00 GMT
Content-Length 232
Content-Type text/html;
charset=UTF-8
Content-Length 232
Content-Encoding gzip
Vary Accept-Encoding
Date Tue, 28 Jun 2016 10:10:05 GMT
Accept-Ranges bytes
Pragma no-cache
Connection close
###############################################################
Then put the same page in a .lc file and, in this way it, the file will be managed by LIveCodeServer.
The header returned by the server was this:
###############################################
HTTP Status Code HTTP/1.1 200 OK
Content-Type text/html;
charset=iso-8859-1
Transfer-Encoding chunked
Content-Encoding gzip
Vary Accept-Encoding
Date Tue, 28 Jun 2016 10:10:05 GMT
Accept-Ranges bytes
Connection close
###############################################
The two header, even for me (that I have a hard head like a rock), are different.

So, I'm trying to force the .lc page to return the header as if the page was run with Apache!

So, let's start ...
a) HTTP Status Code HTTP/1.1 200 OK ---> ok, It is the same in the two header!
b) Content-Type text/html; ---> ok, It is the same in the two header!
c) Content-Encoding gzip ---> ok, It is the same in the two header!
d) Vary Accept-Encoding ---> ok, It is the same in the two header!
e) Accept-Ranges bytes ---> ok, It is the same in the two header!
f) Date Tue, 28 Jun 2016 10:10:05 GMT ---> ok, It is the same in the two header!
g) Connection close ---> ok, It is the same in the two header!
Instead these are the strings of the header that I am able to "rebuild" via this code:

Code: Select all
<?lc
put header "Content-Type: text/html; charset=utf-8"
put header "Cache-Control max-age=0, no-cache, no-store, must-revalidate"
put header "Pragma: no-cache"
?>
But I fail to create:

Expires Tue, 28 Jun 2016 10:10:05 GMT
Last-Modified Tue, 28 Jun 2016 10:09:00 GMT
Content-Length 232
The Expires header string is controlled by Apache row:
Code: Select all
ExpiresActive On
ExpiresByType text/html "access plus 0 seconds"
I have searched everywhere in the forum and in the livecode mailing list, and so here I am to ask you kindly help

Many thanks to all, may God bless you!
Mariasole
=^..^=