Significance of setting NginxRequest hijack

17 views
Skip to first unread message

Rajat Saxena

unread,
Nov 12, 2018, 6:49:02 AM11/12/18
to Nginx-Clojure
Hi,

I am new to Nginx and want to know one basic question,
Why do we need to set NginxJavaRequest.hijack(true) or false.

What is the significance of hijacking the request.

In my code, I am using nginxServerChannel.send api to send the data to the client.

Earliest reply will be appreciated.

Thanks,
Rajat.

Yuexiang Zhang

unread,
Nov 25, 2018, 9:56:53 AM11/25/18
to Rajat Saxena, nginx-...@googlegroups.com
Hi

NginxJavaRequest.hijack is equivalent to NginxJavaRequest.handler().hijack(request, ignoreFilter);

And the complete java doc about hijack is below

    /**
     * Get a hijacked Server Channel used to send message later typically in another thread
     * If ignoreFilter is true all data output to channel won't be filtered
     * by any nginx HTTP header/body filters such as gzip filter, chucked filter, etc.
     * @param req the request object
     * @param ignoreFilter whether we need ignore nginx filter or not.
     * @return hijacked channel used to send message later
     */
    public NginxHttpServerChannel hijack(NginxRequest req, boolean ignoreFilter);

Regards.
xfeep

--
You received this message because you are subscribed to the Google Groups "Nginx-Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nginx-clojur...@googlegroups.com.
To post to this group, send email to nginx-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nginx-clojure/41974195-369a-4e3a-97b9-80ba22dd5ed4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages