Answer the question
In order to leave comments, you need to log in
nginx headers
Hello, there is an nginx server with the nginx-push-stream-module module on it, which allows you to send a local post-request to some url, and the client subscribes to this information via get.
The problem is that I need to send an array of bytes, and through a get-request we get information like: The
question is how to disable the sending of these headers? Is it possible to explicitly indicate that I am sending a stupid set of bytes and I need to receive them without any additional information?
In the nginx config I tried to write:
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 13 Apr 2012 07:37:40 GMT
Content-Type: binary/octet-stream
Connection: close
Transfer-Encoding: chunked
BIARY DATA HERE
http {
gzip on;
server_tokens off;
default_type binary/octet-stream;
...
server {
...
chunked_transfer_encoding off;
push_stream_content_type "binary/octet-stream";
}
}
Answer the question
In order to leave comments, you need to log in
Look towards WebSockets or github.com/yaoweibin/nginx_tcp_proxy_module
This is an HTTP protocol, so you will always get at least an HTTP/1.1 200 OK\n\n, other headers can be omitted. As I understand it, your clients are not browsers? Try in your client to simply filter out the headers. Response body comes after \n\n
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question