diff options
Diffstat (limited to 'src/nxt_go.c')
-rw-r--r-- | src/nxt_go.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nxt_go.c b/src/nxt_go.c index 703974ba..4c77de0d 100644 --- a/src/nxt_go.c +++ b/src/nxt_go.c @@ -158,11 +158,16 @@ nxt_go_prepare_msg(nxt_task_t *task, nxt_app_request_t *r, nxt_app_wmsg_t *wmsg) /* TODO error handle, async mmap buffer assignment */ NXT_WRITE(&h->method); - NXT_WRITE(&h->path); + NXT_WRITE(&h->target); + if (h->path.start == h->target.start) { + NXT_WRITE(&eof); + } else { + NXT_WRITE(&h->path); + } if (h->query.start != NULL) { RC(nxt_app_msg_write_size(task, wmsg, - h->query.start - h->path.start + 1)); + h->query.start - h->target.start + 1)); } else { RC(nxt_app_msg_write_size(task, wmsg, 0)); } |