Opened 12 years ago
Closed 6 years ago
#293 closed enhancement (fixed)
implement $limit_rate_after, similar to $limit_rate
Reported by: | Yuntaek LIM | Owned by: | Maxim Dounin |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | nginx-core | Version: | 1.2.x |
Keywords: | Cc: | ||
uname -a: | Linux SVC2-01 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux | ||
nginx -V: | nginx version: nginx/1.2.6 |
Description
Hi,
This issue would be out of AMI-Support range. However, I would like to know if this is a bug before creating new ticket on 'nignx.org'.
When I set 'ri' and 'rs' parameters together, the value of 'rs' is not applied.
When client requests as an below example with a following configuration, 'limit_rate_after', which is dependent on 'rs' parameter,does not work.
Configuation
server { server_name test-domain.com root /htdocs; location ~* \.flv { flv; if ($arg_LRA) { set $limit_rate_after $arg_LRA; } if ($arg_LR) { set $limit_rate "${arg_LR}k"; } } }
Example of client request
curl -o /dev/null -H "Host: test-domain.com" http://localhost/test.flv?ri=100&rs=8192000
The result of client request shows that 'limit_rate' 100k has worked but limit_rate_after 8192000 has not worked.
I assumed that this is bug, so I've adjusted attached patch file which are modified below files.
./src/http/ngx_http_request.h ./src/http/ngx_http_variables.c ./src/http/ngx_http_write_filter_module.c
I would like to know if there is a problem in my configuration or it is bug.
Attachments (4)
Change History (11)
by , 12 years ago
Attachment: | limit_rate_after.patch added |
---|
follow-up: 3 comment:1 by , 12 years ago
by , 12 years ago
Attachment: | limit_rate_after.2.patch added |
---|
by , 12 years ago
Attachment: | limit_rate_after.3.patch added |
---|
comment:2 by , 12 years ago
I've just attached right file(limit_rate_after.3.patch). Sorry for submitting wrong file.
comment:3 by , 12 years ago
Replying to Ruslan Ermilov:
Could you please properly resubmit the patch?
I would like to know when you will consider this issue.
comment:4 by , 12 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
Summary: | 'rs' Parameter does not work using 'ri' parameter together → implement $limit_rate_after, similar to $limit_rate |
Type: | defect → enhancement |
The patch you attached is wrong as it overrides configuration, thus affecting subsequent request to the same worker process. Overral I think support for $limit_rate_after make sense, I'll take core of it.
comment:5 by , 12 years ago
We've discussed this with Igor, and agreed that it's not a good idea to introduce more magic variables like $limit_rate. Instead, the "limit_rate" directive should be changed to support variables and the $limit_rate magic variable should be deprecated accordingly. Accordingly, there will be no $limit_rate_after, but the "limit_rate_after" directive will be changed to understand variables.
by , 12 years ago
Attachment: | patch-nginx-limit-rate-after.txt added |
---|
Just for history, correct patch to implement $limit_rate_after.
comment:7 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Could you please properly resubmit the patch?