break; usage

Jonathan Dance jd at wuputah.com
Thu Sep 6 23:22:40 MSD 2007


Hi,
I was wondering if anyone could clarify what "break;" does - basically, does
it stop all processing, or only rewrite processing? What is its effect on
proxy_pass? Here are two simple contrasting examples:


location / {
  if (!-f $request_filename) {
    proxy_pass http://somewhere;
    break; # does this do anything?
  }
}

# Is that any different from this?

location / {
  if (-f $request_filename) {
    break; # avoid the proxy_pass?
  }
  proxy_pass http://somewhere;
}

Thanks!

JD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20070906/cb40281a/attachment.html>


More information about the nginx mailing list