@@ -54,6 +54,12 @@ enum chunk_state {
CHUNK_DATA,
};
+/**
+ * The opaque structure presented to GWeb clients on received data or
+ * request closures.
+ *
+ * @private
+ */
struct _GWebResult {
/**
* Operating system error, if any, associated with the request.
@@ -62,11 +68,38 @@ struct _GWebResult {
* domain error number).
*/
int err;
+
+ /**
+ * HTTP status code on success.
+ */
guint16 status;
+
+ /**
+ * HTTP body content on success; otherwise, NULL.
+ */
const guint8 *buffer;
+
+ /**
+ * HTTP body length on success; otherwise, 0.
+ */
gsize length;
+
+ /**
+ * Boolean indicating whether the HTTP response uses HTTP/1.1
+ * chunked transfer encoding.
+ */
bool use_chunk;
+
+ /**
+ * An optional pointer to a null-terminated C string containing
+ * the last HTTP header name added as part of a header key/value
+ * pair.
+ */
gchar *last_key;
+
+ /**
+ * HTTP headers, on success, keyed by the header name.
+ */
GHashTable *headers;
};