You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by fi...@apache.org on 2007/10/02 22:36:47 UTC
svn commit: r581374 - /httpd/httpd/trunk/modules/http/http_core.c
Author: fielding
Date: Tue Oct 2 13:36:47 2007
New Revision: 581374
URL: http://svn.apache.org/viewvc?rev=581374&view=rev
Log:
Reduce the last change to a minimum, since OPTIONS * does not
include an Allow header field (* is not a resource).
Modified:
httpd/httpd/trunk/modules/http/http_core.c
Modified: httpd/httpd/trunk/modules/http/http_core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/http_core.c?rev=581374&r1=581373&r2=581374&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http/http_core.c (original)
+++ httpd/httpd/trunk/modules/http/http_core.c Tue Oct 2 13:36:47 2007
@@ -236,21 +236,11 @@
static int http_send_options(request_rec *r)
{
- int rv;
- if ((r->method_number != M_OPTIONS) || !r->uri || strcmp(r->uri, "*")) {
- return DECLINED;
+ if ((r->method_number == M_OPTIONS) && r->uri && (r->uri[0] == '*')) {
+ return OK; /* Send HTTP pong, without Allow header */
}
-
- ap_allow_standard_methods(r, MERGE_ALLOW, M_GET, M_OPTIONS, M_POST, -1);
- rv = ap_send_http_options(r);
-
- if (rv == OK) {
- rv = DONE;
- }
-
- return rv;
+ return DECLINED;
}
-
static void register_hooks(apr_pool_t *p)
{
Re: svn commit: r581374 - /httpd/httpd/trunk/modules/http/http_core.c
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
fielding@apache.org wrote:
> Log:
> Reduce the last change to a minimum, since OPTIONS * does not
> include an Allow header field (* is not a resource).
Ignore my previous question; obviously this makes it a non-issue.
Re: svn commit: r581374 - /httpd/httpd/trunk/modules/http/http_core.c
Posted by Jim Jagielski <ji...@jaguNET.com>.
On Oct 2, 2007, at 5:15 PM, Ruediger Pluem wrote:
>
>
> On 10/02/2007 10:36 PM, fielding@apache.org wrote:
>> Author: fielding
>> Date: Tue Oct 2 13:36:47 2007
>> New Revision: 581374
>>
>> URL: http://svn.apache.org/viewvc?rev=581374&view=rev
>> Log:
>> Reduce the last change to a minimum, since OPTIONS * does not
>> include an Allow header field (* is not a resource).
>>
>>
>> Modified:
>> httpd/httpd/trunk/modules/http/http_core.c
>>
>> Modified: httpd/httpd/trunk/modules/http/http_core.c
>> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/
>> http_core.c?rev=581374&r1=581373&r2=581374&view=diff
>> =====================================================================
>> =========
>> --- httpd/httpd/trunk/modules/http/http_core.c (original)
>> +++ httpd/httpd/trunk/modules/http/http_core.c Tue Oct 2 13:36:47
>> 2007
>> @@ -236,21 +236,11 @@
>>
>> static int http_send_options(request_rec *r)
>> {
>> - int rv;
>> - if ((r->method_number != M_OPTIONS) || !r->uri || strcmp(r-
>> >uri, "*")) {
>> - return DECLINED;
>> + if ((r->method_number == M_OPTIONS) && r->uri && (r->uri[0]
>> == '*')) {
>> + return OK; /* Send HTTP pong, without Allow
>> header */
>
> Why OK and not DONE?
> AFAIK DONE causes to shortcut further processing whereas OK causes
> the full processing
> including Directories / Locations / handler (See
> request.c:ap_process_request_internal:150 and
> http_request.c:ap_process_async_request:242-251).
>
Already fixed... I noticed this right off the bat.
Re: svn commit: r581374 - /httpd/httpd/trunk/modules/http/http_core.c
Posted by "Roy T. Fielding" <fi...@gbiv.com>.
On Oct 2, 2007, at 2:15 PM, Ruediger Pluem wrote:
>> - if ((r->method_number != M_OPTIONS) || !r->uri || strcmp(r-
>> >uri, "*")) {
>> - return DECLINED;
>> + if ((r->method_number == M_OPTIONS) && r->uri && (r->uri[0]
>> == '*')) {
>> + return OK; /* Send HTTP pong, without Allow
>> header */
>
> Why OK and not DONE?
No idea how that happened, other than a simple brain fart.
I had first changed
+ if (rv == OK) {
+ rv = DONE;
+ }
+
+ return rv;
to
return (rv == OK) DONE : rv;
and then removed the ap_allow_standard_methods and ap_send_http_options,
which made rv unnecessary, which naturally caused that line to become
return OK;
for no good reason. *shrug*
....Roy
Re: svn commit: r581374 - /httpd/httpd/trunk/modules/http/http_core.c
Posted by Ruediger Pluem <rp...@apache.org>.
On 10/02/2007 10:36 PM, fielding@apache.org wrote:
> Author: fielding
> Date: Tue Oct 2 13:36:47 2007
> New Revision: 581374
>
> URL: http://svn.apache.org/viewvc?rev=581374&view=rev
> Log:
> Reduce the last change to a minimum, since OPTIONS * does not
> include an Allow header field (* is not a resource).
>
>
> Modified:
> httpd/httpd/trunk/modules/http/http_core.c
>
> Modified: httpd/httpd/trunk/modules/http/http_core.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/http_core.c?rev=581374&r1=581373&r2=581374&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/http/http_core.c (original)
> +++ httpd/httpd/trunk/modules/http/http_core.c Tue Oct 2 13:36:47 2007
> @@ -236,21 +236,11 @@
>
> static int http_send_options(request_rec *r)
> {
> - int rv;
> - if ((r->method_number != M_OPTIONS) || !r->uri || strcmp(r->uri, "*")) {
> - return DECLINED;
> + if ((r->method_number == M_OPTIONS) && r->uri && (r->uri[0] == '*')) {
> + return OK; /* Send HTTP pong, without Allow header */
Why OK and not DONE?
AFAIK DONE causes to shortcut further processing whereas OK causes the full processing
including Directories / Locations / handler (See request.c:ap_process_request_internal:150 and
http_request.c:ap_process_async_request:242-251).
Regards
RĂ¼diger