

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
11 messages in ru.sysoev.nginxRe: doc: limit_except| From | Sent On | Attachments |
|---|---|---|
| Gregg Reynolds | Mar 15, 2007 11:11 am | |
| Igor Sysoev | Mar 15, 2007 11:23 am | |
| Igor Sysoev | Mar 15, 2007 11:29 am | |
| Gregg Reynolds | Mar 15, 2007 1:51 pm | |
| Igor Sysoev | Mar 16, 2007 12:00 am | |
| Gregg Reynolds | Mar 16, 2007 1:59 am | |
| Igor Sysoev | Mar 16, 2007 2:17 am | |
| Gregg Reynolds | Mar 16, 2007 4:17 am | |
| Igor Sysoev | Mar 16, 2007 4:26 am | |
| Gregg Reynolds | Mar 16, 2007 7:37 am | |
| Igor Sysoev | Mar 16, 2007 8:10 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: doc: limit_except | Actions... |
|---|---|---|
| From: | Gregg Reynolds (dev-...@public.gmane.org) | |
| Date: | Mar 16, 2007 7:37:38 am | |
| List: | ru.sysoev.nginx | |
On 3/16/07, Igor Sysoev <is-G...@public.gmane.org> wrote:
The "!=" is good for me, thank you. I think the "==" should be omitted:
methods POST ... methods LOCK UNLOCK ... methods != GET ...
Ok by me. Another option occurred to me, which might be clearer and is certainly more powerful: use set operators. Also, isn't the method available in a variable? So, e.g.
$method memberof {POST...} { ... } $method not memberof {GET} {...}
Of course you could pick a different keyword (eltof, etc). I would avoid "in" to avoid a collision with the sense of "inwardly directed". You could do something like %member, too.
The nice thing about this is that it removes a directive and relies only on syntax. The directive name doesn't actually do any work, after all. And with a set membership test you have a more general capability. Then it's just a predicate test, and you can support any predicate you like:
$UA memberof {IE SAFARI...} {...}
The semantics can be inferred directly from the syntax: no need for a directive.
Actually, now that I think about it, there is a good reason not to omit the operator (whether if be equality or membership). Something like
methods LOCK UNLOCK ...
can easily be misread to mean "here is a list of methods against which to test the request method." But that would imply that
methods != LOCK UNLOCK...
must mean "here's a list of methods _not_ to test the request method against". Logically this cannot imply that "methods" is everything else. The test is in fact a set membership test on the (one) request method against the method-list args. At least it looks that way to me. So both omission of an operator and use of the plural would be misleading.
In any case, this will be an improvement on limit_except. Now I can write the documentation. ;)
gregg







