From: Greg Ames Date: Thu, 25 Apr 2002 20:51:49 +0000 (+0000) Subject: remove a goto X-Git-Tag: 2.0.36~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5234ec416665c84e65b1153f89c14f43d81ff43;p=thirdparty%2Fapache%2Fhttpd.git remove a goto git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94807 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/core.c b/server/core.c index 41d3fae2aac..f0f7a5bf0cf 100644 --- a/server/core.c +++ b/server/core.c @@ -3168,7 +3168,16 @@ static int default_handler(request_rec *r) } if (r->method_number != M_GET && r->method_number != M_POST) { - goto unusual_method; + if (r->method_number == M_INVALID) { + ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r, + "Invalid method in request %s", r->the_request); + return HTTP_NOT_IMPLEMENTED; + } + + if (r->method_number == M_OPTIONS) { + return ap_send_http_options(r); + } + return HTTP_METHOD_NOT_ALLOWED; } if (r->finfo.filetype == 0) { @@ -3239,17 +3248,6 @@ static int default_handler(request_rec *r) return ap_pass_brigade(r->output_filters, bb); -unusual_method: - if (r->method_number == M_INVALID) { - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r, - "Invalid method in request %s", r->the_request); - return HTTP_NOT_IMPLEMENTED; - } - - if (r->method_number == M_OPTIONS) { - return ap_send_http_options(r); - } - return HTTP_METHOD_NOT_ALLOWED; } static int net_time_filter(ap_filter_t *f, apr_bucket_brigade *b,