NGINX - performance HTTP server Support Forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Unofficial (YET) support forums for NGINX, a performance HTTP server.

Pages: [1]   Go Down

Author Topic: Sending long responses to client  (Read 405 times)

0 Members and 1 Guest are viewing this topic.

Marcus

  • Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 1
    • View Profile
Sending long responses to client
« on: February 06, 2009, 01:37:12 AM »
Hi,

I'm writing an NginX module that generates code, and am trying to work out whether it's possible to generate code in a handler in blocks (e.g. buffers of 4KB) rather than generating the whole output at once.

e.g. something like

if (buf_len < buf_max_len) {
   ...
} else {
   send_buf (...);
}

Can you just call ngx_http_output_filter(r, &out) many times within a handler (or filter), or can you only call it when you've finished generating content?

Also, can Nginx start sending content that's generated before the content length is known?  I think this is in HTTP 1.1 isn't it? Is there a special function that's called to do this?

Thanks.
Logged
Pages: [1]   Go Up
« previous next »
 

Page created in 0.066 seconds with 23 queries.