added: Request::header_in (Space) http input headers (without cookies)
added: config parameter: log_env_http_variables (bool) (for logging http headers) added: support for DELETE http method, added method FunctionBase::MakeDelete() changed: winix version incremented to 0.6.6 git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1100 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008-2015, Tomasz Sowa
|
||||
* Copyright (c) 2008-2018, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -64,6 +64,16 @@ class FunctionBase;
|
||||
|
||||
struct Request
|
||||
{
|
||||
// how many input headers can be put to in_headers struct
|
||||
static const size_t MAX_INPUT_HEADERS = 32;
|
||||
|
||||
// how many characters there can be in one header name
|
||||
static const size_t INPUT_HEADER_NAME_MAX_LENGTH = 64;
|
||||
|
||||
// how many characters there can be in one header value
|
||||
static const size_t INPUT_HEADER_VALUE_MAX_LENGTH = 8192;
|
||||
|
||||
|
||||
/*
|
||||
request id
|
||||
is incremented for each request and is never 0
|
||||
@@ -97,7 +107,7 @@ struct Request
|
||||
the HTTP method
|
||||
!! IMPROVE ME add the rest methods here
|
||||
*/
|
||||
enum Method { get, post, head, unknown_method } method;
|
||||
enum Method { get, post, head, delete_, unknown_method } method;
|
||||
|
||||
|
||||
/*
|
||||
@@ -116,6 +126,15 @@ struct Request
|
||||
PostFileTab post_file_tab;
|
||||
CookieTab cookie_tab;
|
||||
|
||||
// input headers (without cookies)
|
||||
// at the moment we are using FastCGI and HTTP headers are prefixed with 'HTTP_' string
|
||||
// so we drop the prefix and change all characters to small ones
|
||||
|
||||
// although https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 says that there can be more
|
||||
// than one http header with the same name we do not support it
|
||||
// each header has a different name here, cookies we have in a different container (cookie_tab)
|
||||
PT::Space headers_in;
|
||||
|
||||
|
||||
/*
|
||||
html anchor (those part of URI after '#' character)
|
||||
@@ -209,7 +228,7 @@ struct Request
|
||||
// send as attachment (causes generating header: content-disposition: attachment)
|
||||
bool send_as_attachment;
|
||||
|
||||
// headers send to the client (without cookies)
|
||||
// headers send to the client (without cookies) (may change to headers_out?)
|
||||
PT::Space out_headers;
|
||||
|
||||
// cookies send to the client
|
||||
|
||||
Reference in New Issue
Block a user