Mercurial > hg > nginx-quic
view src/os/win32/ngx_thread.c @ 5107:4b744a2fb1a6
Gzip: fixed setting of NGX_HTTP_GZIP_BUFFERED.
In r2411 setting of NGX_HTTP_GZIP_BUFFERED in c->buffered was moved from
ngx_http_gzip_filter_deflate_start() to ngx_http_gzip_filter_buffer() since
it was always called first. But in r2543 the "postpone_gzipping" directive
was introduced, and if postponed gzipping is disabled (the default setting),
ngx_http_gzip_filter_buffer() is not called at all.
We must always set NGX_HTTP_GZIP_BUFFERED after the start of compression
since there is always a trailer that is buffered.
There are no known cases when it leads to any problem with current code.
But we already had troubles in upcoming SPDY implementation.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Mon, 11 Mar 2013 11:19:58 +0000 |
parents | 2942a827da09 |
children | 94ce52db3367 |
line wrap: on
line source
/* * Copyright (C) Igor Sysoev * Copyright (C) Nginx, Inc. */ #include <ngx_config.h> #include <ngx_core.h> ngx_int_t ngx_threads_n; static size_t stack_size; ngx_err_t ngx_create_thread(ngx_tid_t *tid, ngx_thread_value_t (__stdcall *func)(void *arg), void *arg, ngx_log_t *log) { u_long id; ngx_err_t err; *tid = CreateThread(NULL, stack_size, func, arg, 0, &id); if (*tid != NULL) { ngx_log_error(NGX_LOG_NOTICE, log, 0, "create thread " NGX_TID_T_FMT, id); return 0; } err = ngx_errno; ngx_log_error(NGX_LOG_ALERT, log, err, "CreateThread() failed"); return err; } ngx_int_t ngx_init_threads(int n, size_t size, ngx_cycle_t *cycle) { stack_size = size; return NGX_OK; } ngx_err_t ngx_thread_key_create(ngx_tls_key_t *key) { *key = TlsAlloc(); if (*key == TLS_OUT_OF_INDEXES) { return ngx_errno; } return 0; } ngx_err_t ngx_thread_set_tls(ngx_tls_key_t *key, void *data) { if (TlsSetValue(*key, data) == 0) { return ngx_errno; } return 0; } ngx_mutex_t * ngx_mutex_init(ngx_log_t *log, ngx_uint_t flags) { ngx_mutex_t *m; m = ngx_alloc(sizeof(ngx_mutex_t), log); if (m == NULL) { return NULL; } m->log = log; /* STUB */ return m; } /* STUB */ void ngx_mutex_lock(ngx_mutex_t *m) { return; } ngx_int_t ngx_mutex_trylock(ngx_mutex_t *m) { return NGX_OK; } void ngx_mutex_unlock(ngx_mutex_t *m) { return; } /**/