mirror of
https://github.com/cesanta/mongoose.git
synced 2025-06-07 09:27:05 +08:00
Move struct http_message::body
Rationale: this is the optimisation to make JS FFI-ed API work nicer. We don't have strucuture introspection now, and do not generate offsets automatially. Thus, using a stable well-known location of the parsed message body is better, in case of number of HTTP headers macro changes. PUBLISHED_FROM=55bf25ac77060a9c81dfecd6601f037562530801
This commit is contained in:
parent
a0527a7f0e
commit
cfe77a3d58
@ -5,6 +5,7 @@ symbol_kind: "struct"
|
||||
signature: |
|
||||
struct http_message {
|
||||
struct mg_str message; /* Whole message: request line + headers + body */
|
||||
struct mg_str body; /* Message body. 0-length for requests with no body */
|
||||
|
||||
/* HTTP Request line (or HTTP response line) */
|
||||
struct mg_str method; /* "GET" */
|
||||
@ -28,9 +29,6 @@ signature: |
|
||||
/* Headers */
|
||||
struct mg_str header_names[MG_MAX_HTTP_HEADERS];
|
||||
struct mg_str header_values[MG_MAX_HTTP_HEADERS];
|
||||
|
||||
/* Message body */
|
||||
struct mg_str body; /* Zero-length for requests with no body */
|
||||
};
|
||||
---
|
||||
|
||||
|
@ -4140,6 +4140,7 @@ extern "C" {
|
||||
/* HTTP message */
|
||||
struct http_message {
|
||||
struct mg_str message; /* Whole message: request line + headers + body */
|
||||
struct mg_str body; /* Message body. 0-length for requests with no body */
|
||||
|
||||
/* HTTP Request line (or HTTP response line) */
|
||||
struct mg_str method; /* "GET" */
|
||||
@ -4163,9 +4164,6 @@ struct http_message {
|
||||
/* Headers */
|
||||
struct mg_str header_names[MG_MAX_HTTP_HEADERS];
|
||||
struct mg_str header_values[MG_MAX_HTTP_HEADERS];
|
||||
|
||||
/* Message body */
|
||||
struct mg_str body; /* Zero-length for requests with no body */
|
||||
};
|
||||
|
||||
#if MG_ENABLE_HTTP_WEBSOCKET
|
||||
|
Loading…
Reference in New Issue
Block a user