Thanks m-r Dounin, I understood your point of view. The patch is not correct. Thank you. On 08/16/2011 03:42 PM, Maxim Dounin wrote: > Hello! > > On Tue, Aug 16, 2011 at 02:40:29PM +0300, Anatoli Marinov wrote: > >> My patch for this issue was: >> @@ -157,16 +157,13 @@ >> len = r->headers_in.x_forwarded_for->value.len; >> ip = r->hby toli - Nginx Development
My patch for this issue was: @@ -157,16 +157,13 @@ len = r->headers_in.x_forwarded_for->value.len; ip = r->headers_in.x_forwarded_for->value.data; - for (p = ip + len - 1; p > ip; p--) { - if (*p == ' ' || *p == ',') { - p++; - len -= p - ip; - ip = p; - break; - } -by toli - Nginx Development
Hello mates, I tried readip_module and I found it does not work as I expect. For example the header may looks like this: X-Forwarded-For: client1, proxy1, proxy2 Where client1 should be the real ip address of the client, proxy1 should be the first proxy after the client and proxy2 should be the last proxy after the client and the first before the nginx. Nginx has the connection with proxy2. Iby toli - Nginx Development
Hello mates, Is there an easy way to send (attach) custom header to http request send through upstream? I am looking for something like proxy_set_header X-my-test-header 123123; but I want to set it from a module not from config file. Thanks in advance A. Marinov _______________________________________________ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listby toli - Nginx Development
The module is already done. Always after I post the question I manage to found the solution alone :) just a luck. Tomorrow I am going to post the code. On 19.7.2011 г. 19:46 ч., Maxim Uvarov wrote: > You have to write your own module (which has some tricks to get hole POST, > refer to echo or lua modules.). Or use lua module. Somewhere in maillist were > examples how to do it. But onby toli - Nginx Development
Hello colleagues, I am wondering is it possible to receive whole post data in a handler module? If it possible where I can found the received post data. I am writing a module that should be able to remove some files from proxy_cache but I want to remove a bundle of them. The list with files will be send through POST request. Thanks in advance A. Marinov _______________________________________by toli - Nginx Development
Hello mates, I continued to work on the issue I found in my module. I wrote another simpler module that just collect first 128 KB of each served file and write them in a file. Unfortunately for one and the same served file I found different content in dump files and this is very confusing situation. Maybe my function that collect separated buffers from the chains is wrong? The function skip onby toli - Nginx Development
Hello Colleagues, I am trying to write a filter that should buffer some data coming from upstream. When the filter has collected enough data (for example 3 MB), special function will estimate the desired limit rate related to the data from the buffer (the files are mp4 so limit rate will be set according to the mp4 bitrate). In most cases it works but sometime for one and the same file I gotby toli - Nginx Development
Thanks Marcus! This "r->upstream->cacheable = 0;" works like a charm :) I am going to remove my ugly patch. On 04/13/2011 06:17 PM, Eugaia wrote: > Hi, > > On 13/04/2011 14:50, Anatoli Marinov wrote: >> I succeed to remove the file after it is saved in tmp directory and >> before to be moved in cache directory. >> The patch is little bit ugly :) >by toli - Nginx Development
I succeed to remove the file after it is saved in tmp directory and before to be moved in cache directory. The patch is little bit ugly :) I added new variable in struct ngx_http_request_s { ...................... ...................... ...................... ngx_http_event_handler_pt write_event_handler; #if (NGX_HTTP_CACHE) ngx_http_cache_t *cache; + ngx_inby toli - Nginx Development
On 04/13/2011 12:47 PM, Igor Sysoev wrote: > On Wed, Apr 13, 2011 at 12:03:29PM +0300, Anatoli Marinov wrote: >> Hello, >> Is there a way to cancel file caching from header filter? >> >> I am using nginx as a reverse proxy and proxy_cache for caching and this >> configuration serves flv files. >> >> Standard flv module cannot work with proxy_cache so stby toli - Nginx Development
Hello, Is there a way to cancel file caching from header filter? I am using nginx as a reverse proxy and proxy_cache for caching and this configuration serves flv files. Standard flv module cannot work with proxy_cache so start= argument is not understand by the nginx. There is other internal server (typically a cloud of them) that understands the argument and return a chunk from the file -by toli - Nginx Development