[asterisk-dev] Issues with main/http.c in trunk

Kevin P. Fleming kpfleming at digium.com
Mon Mar 24 07:11:13 CDT 2008


Dan Austin wrote:

> 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.

That's not making any sense to me; the first version is checking to see
if the character pointed to by 'c' is zero, and the second is checking
to see if the string pointed to by 'c' is zero-length. By definition
those are the same thing.

> 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.

Yes, all callbacks now need to specify whether they support GET, POST or
both. I made these changes in manager.c when I committed the changes to
http.c. What 'all callbacks' are you referring to?

In addition, http.c generates a warning message when a callback is
registered that does not specify at least one of GET or POST; did you
not see those messages?

> 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.

I'll look for that, but I'm concerned that you are seeing behavior that
doesn't seem to make any sense :-)

-- 
Kevin P. Fleming
Director of Software Technologies
Digium, Inc. - "The Genuine Asterisk Experience" (TM)



More information about the asterisk-dev mailing list