updated to the new Pikotools API
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1071 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2010-2015, Tomasz Sowa
|
||||
* Copyright (c) 2010-2018, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -1141,23 +1141,26 @@ void App::PrepareHeadersNormal(Header header, size_t output_size)
|
||||
// and if compression is enabled the client's browser will not be able to decompress the stream
|
||||
void App::SendHeaders()
|
||||
{
|
||||
PT::Space::TableSingle::iterator i;
|
||||
PT::Space::Table::iterator i;
|
||||
PT::Space & headers = cur.request->out_headers;
|
||||
|
||||
plugin.Call(WINIX_PREPARE_TO_SEND_HTTP_HEADERS, &headers);
|
||||
|
||||
for(i=headers.table_single.begin() ; i != headers.table_single.end() ; ++i)
|
||||
for(i=headers.table.begin() ; i != headers.table.end() ; ++i)
|
||||
{
|
||||
PT::WideToUTF8(i->first, aheader_name);
|
||||
PT::WideToUTF8(i->second, aheader_value);
|
||||
if( i->second.size() == 1 )
|
||||
{
|
||||
PT::WideToUTF8(i->first, aheader_name);
|
||||
PT::WideToUTF8(i->second[0], aheader_value);
|
||||
|
||||
FCGX_PutS(aheader_name.c_str(), fcgi_request.out);
|
||||
FCGX_PutS(": ", fcgi_request.out);
|
||||
FCGX_PutS(aheader_value.c_str(), fcgi_request.out);
|
||||
FCGX_PutS("\r\n", fcgi_request.out);
|
||||
FCGX_PutS(aheader_name.c_str(), fcgi_request.out);
|
||||
FCGX_PutS(": ", fcgi_request.out);
|
||||
FCGX_PutS(aheader_value.c_str(), fcgi_request.out);
|
||||
FCGX_PutS("\r\n", fcgi_request.out);
|
||||
|
||||
if( config.log_http_answer_headers )
|
||||
log << log1 << "HTTP Header: " << aheader_name << ": " << aheader_value << logend;
|
||||
if( config.log_http_answer_headers )
|
||||
log << log1 << "HTTP Header: " << aheader_name << ": " << aheader_value << logend;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1165,24 +1168,27 @@ void App::SendHeaders()
|
||||
|
||||
void App::SendCookies()
|
||||
{
|
||||
PT::Space::TableSingle::iterator i;
|
||||
PT::Space::Table::iterator i;
|
||||
PT::Space & cookies = cur.request->out_cookies;
|
||||
|
||||
plugin.Call(WINIX_PREPARE_TO_SEND_HTTP_COOKIES, &cookies);
|
||||
|
||||
for(i=cookies.table_single.begin() ; i != cookies.table_single.end() ; ++i)
|
||||
for(i=cookies.table.begin() ; i != cookies.table.end() ; ++i)
|
||||
{
|
||||
PT::WideToUTF8(i->first, aheader_name);
|
||||
PT::WideToUTF8(i->second, aheader_value);
|
||||
if( i->second.size() == 1 )
|
||||
{
|
||||
PT::WideToUTF8(i->first, aheader_name);
|
||||
PT::WideToUTF8(i->second[0], aheader_value);
|
||||
|
||||
FCGX_PutS("Set-Cookie: ", fcgi_request.out);
|
||||
FCGX_PutS(aheader_name.c_str(), fcgi_request.out);
|
||||
FCGX_PutS("=", fcgi_request.out);
|
||||
FCGX_PutS(aheader_value.c_str(), fcgi_request.out);
|
||||
FCGX_PutS("\r\n", fcgi_request.out);
|
||||
FCGX_PutS("Set-Cookie: ", fcgi_request.out);
|
||||
FCGX_PutS(aheader_name.c_str(), fcgi_request.out);
|
||||
FCGX_PutS("=", fcgi_request.out);
|
||||
FCGX_PutS(aheader_value.c_str(), fcgi_request.out);
|
||||
FCGX_PutS("\r\n", fcgi_request.out);
|
||||
|
||||
if( config.log_http_answer_headers )
|
||||
log << log1 << "HTTP Header: Set-Cookie: " << aheader_name << "=" << aheader_value << logend;
|
||||
if( config.log_http_answer_headers )
|
||||
log << log1 << "HTTP Header: Set-Cookie: " << aheader_name << "=" << aheader_value << logend;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user