summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_http_request.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nxt_http_request.c')
-rw-r--r--src/nxt_http_request.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/nxt_http_request.c b/src/nxt_http_request.c
index 425a4607..0a89b327 100644
--- a/src/nxt_http_request.c
+++ b/src/nxt_http_request.c
@@ -6,6 +6,7 @@
#include <nxt_router.h>
#include <nxt_http.h>
+#include <nxt_http_compression.h>
static nxt_int_t nxt_http_validate_host(nxt_str_t *host, nxt_mp_t *mp);
@@ -311,6 +312,8 @@ nxt_http_request_start(nxt_task_t *task, void *obj, void *data)
nxt_socket_conf_t *skcf;
nxt_http_request_t *r;
+ printf("%s: \n", __func__);
+
r = obj;
r->state = &nxt_http_request_body_state;
@@ -636,6 +639,13 @@ nxt_http_request_header_send(nxt_task_t *task, nxt_http_request_t *r,
nxt_http_field_t *server, *date, *content_length;
nxt_socket_conf_t *skcf;
+ printf("%s: \n", __func__);
+
+ ret = nxt_http_comp_check_compression(task, r);
+ if (nxt_slow_path(ret != NXT_OK)) {
+ goto fail;
+ }
+
ret = nxt_http_set_headers(r);
if (nxt_slow_path(ret != NXT_OK)) {
goto fail;
@@ -726,6 +736,10 @@ nxt_http_request_ws_frame_start(nxt_task_t *task, nxt_http_request_t *r,
void
nxt_http_request_send(nxt_task_t *task, nxt_http_request_t *r, nxt_buf_t *out)
{
+ printf("%s: \n", __func__);
+
+ nxt_http_comp_compress_response(out);
+
if (nxt_fast_path(r->proto.any != NULL)) {
nxt_http_proto[r->protocol].send(task, r, out);
}