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:
Sergey Lyubka authored and Cesanta Bot committed 2017-05-06 11:26:53 +00:00
1 parent a0527a7f0e
commit cfe77a3d58
2 files changed
+2 -6

No files matched your search

+1 -3
View File
@@ -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 */
};
---