changed values for send_file_mode config parameter:
0 - winix will read the content of the file and send it back to the webserver 1 - winix will use send_file_header header with a full path to the file 2 - winix will use send_file_header header with a relative path to the file
This commit is contained in:
@@ -1494,25 +1494,28 @@ void App::PrepareHeaderContentType()
|
||||
{
|
||||
if( !cur.request->out_headers.has_key(L"Content-Type") )
|
||||
{
|
||||
if( cur.request->return_json )
|
||||
if( !cur.request->send_bin_stream )
|
||||
{
|
||||
cur.request->out_headers.add(L"Content-Type", L"application/json; charset=UTF-8");
|
||||
}
|
||||
else
|
||||
{
|
||||
switch( config.content_type_header )
|
||||
if( cur.request->return_json )
|
||||
{
|
||||
case 1:
|
||||
cur.request->out_headers.add(L"Content-Type", L"application/xhtml+xml; charset=UTF-8");
|
||||
break;
|
||||
|
||||
case 2:
|
||||
cur.request->out_headers.add(L"Content-Type", L"application/xml; charset=UTF-8");
|
||||
break;
|
||||
cur.request->out_headers.add(L"Content-Type", L"application/json; charset=UTF-8");
|
||||
}
|
||||
else
|
||||
{
|
||||
switch( config.content_type_header )
|
||||
{
|
||||
case 1:
|
||||
cur.request->out_headers.add(L"Content-Type", L"application/xhtml+xml; charset=UTF-8");
|
||||
break;
|
||||
|
||||
case 0:
|
||||
default:
|
||||
cur.request->out_headers.add(L"Content-Type", L"text/html; charset=UTF-8");
|
||||
case 2:
|
||||
cur.request->out_headers.add(L"Content-Type", L"application/xml; charset=UTF-8");
|
||||
break;
|
||||
|
||||
case 0:
|
||||
default:
|
||||
cur.request->out_headers.add(L"Content-Type", L"text/html; charset=UTF-8");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user