and if I change header Server to other strings,
I cound get this string,
but I could see from Chrome devtools that it's value is MakoServer.net and this string.
there're two values for header Server now. why?
<?lsp
response:setheader('Server', 'myServer')
response:write('Server: ',response:containsheader('Server')) -- got myServer, but MakoServer.net still exists
?>
is this a bug , or it is a feature ?
doc says that the new value overwrites the previous one :
response:setheader(name [, value])
Sets a HTTP response header with the given name and value. If the header had already been set, the new value overwrites the previous one. The response:containsheader method can be used to test for the presence of a header before setting its value. If the value is not provided then the named header is removed from the response.
setheader() should be called before the response has been committed to the client, (before response body output has been flushed). If the response already has been committed, this method returns false.
hi, just tried mako server.
I got blank string for response header Server, while I cound see from Chrome devtools that it's value is MakoServer.net
and if I change header Server to other strings, I cound get this string, but I could see from Chrome devtools that it's value is MakoServer.net and this string. there're two values for header Server now. why?
is this a bug , or it is a feature ?
doc says that
the new value overwrites the previous one
: