[asterisk-dev] Issues with main/http.c in trunk
Dan Austin
Dan_Austin at Phoenix.com
Sun Mar 23 12:43:06 CDT 2008
Kevin wrote:
> Dan Austin wrote:
>> Issues found-
>> Prefix does not really have a default.
>> Having no configure prefix causes a test
>> in handle_uri to fail. (look for l = strlen(prefix))
That's certainly a bug.
>> Parsing of params is tied to AST_HTTP_GET, but it
>> appears that it should be _POST?
> It was never possible to parse URI parameters for POST until I merged
> the code this past week, and for safety's sake I chose to leave it so
> that only GET requests would get parameters parsed. I'm actually OK with
> enabling it for POST as well.
>> Once a matching urih is found, we do not break out
>> of the macro'd loop. The result is we keep on
>> processing and lose the matching urih and always
>> trigger a '501 Not implimented'
> I've just looked over the code and I'm sure not why this is happening;
> there is a 'break' statement inside the if statement that finds the
> matching urih.
The code is never reached. The test for !*c always fails (it exists, but
might not contain anything interesting). I replace that with !strlen(c),
which then allowed the code to get as far as the test for supports_*
which also tended to fail.
My patch for this is growing, which lowers my confidence. I found I needed
to add the support_get or support_post to all callbacks, otherwise I would
be able to load the page or submit forms/commands, but not both.
And I am not sure it is related, but I cannot use the ajamdemo as the browser
complains about astmanEngine not being define, which points to a problem
delivering the *.js includes.
I can put the patch up on Mantis tomorrow. I fully expect it to not
be the solution, but maybe it can better explain the issues.
Dan
More information about the asterisk-dev
mailing list