[Home]

Summary:ASTERISK-11627: Make Asterisk-trunk handle 'prefix' in httpd.conf as 1.4 does.
Reporter:Brandon Kruse (bkruse)Labels:
Date Opened:2008-03-12 12:00:15Date Closed:2008-06-25 20:06:40
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/HTTP
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:In Asterisk 1.4, including BE and builds on the AA50, if the 'prefix' variable in http.conf is not set, then that means there is no prefix.

(For example http://bkruse/static/config/cfgbasic.html)

And if prefix=testing, the above example would be:

http://bkruse/testing/static/config/cfgbasic.html

By default, in all places, we do NOT set a prefix. We do this so the link will be shorter, easier to remember, and not easily changed. That is just how it is.

In Trunk, however, if prefix is NOT set in http.conf, then the ast_http_post_mapping to /var/lib/asterisk/static-http/config is never made because it return's NULL, as seen here:

       if (!ast_strlen_zero(prefix) && strncmp(prefix, uri, strlen(prefix))) {
               ast_debug(1, "URI %s does not have prefix %s\n", uri, prefix);
               return NULL;
       }

Comments:By: Russell Bryant (russell) 2008-03-12 17:01:54

what does the http settings CLI command show as the prefix setting?  That block shouldn't be triggered unless the prefix option is set to something that has a length that is non-zero ...

By: Digium Subversion (svnbot) 2008-03-12 17:45:21

Repository: asterisk
Revision: 108346

U   trunk/main/http.c

------------------------------------------------------------------------
r108346 | russell | 2008-03-12 17:45:19 -0500 (Wed, 12 Mar 2008) | 4 lines

Make the default prefix empty, like it was in Asterisk 1.4.

(closes issue ASTERISK-11627, reported by bkruse, patched by me)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=108346

By: Digium Subversion (svnbot) 2008-03-12 17:45:42

Repository: asterisk
Revision: 108347

_U  branches/1.6.0/
U   branches/1.6.0/main/http.c

------------------------------------------------------------------------
r108347 | russell | 2008-03-12 17:45:41 -0500 (Wed, 12 Mar 2008) | 12 lines

Merged revisions 108346 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r108346 | russell | 2008-03-12 17:49:26 -0500 (Wed, 12 Mar 2008) | 4 lines

Make the default prefix empty, like it was in Asterisk 1.4.

(closes issue ASTERISK-11627, reported by bkruse, patched by me)

........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=108347

By: Brandon Kruse (bkruse) 2008-03-26 14:49:57

Opening back up, as it did not seem to fix the problem.

-bk

By: Brandon Kruse (bkruse) 2008-03-26 14:55:21

Will triple check with trunk right now, but I believe the problem was never fully fixed.

I mentioned this to russell on IRC, but did not take the right path to getting it fixed, which is to keep track of bugs in the.....bug tracker :]


-bk

By: Russell Bryant (russell) 2008-03-31 18:03:10

I think twilson may have just fixed this ...

By: Brandon Kruse (bkruse) 2008-04-03 12:21:50

This is fixed in 1.6.0

Great job russell/twilson.

Thank you!

-bk

By: Digium Subversion (svnbot) 2008-06-25 20:04:30

Repository: asterisk
Revision: 125191

U   trunk/configs/http.conf.sample

------------------------------------------------------------------------
r125191 | tilghman | 2008-06-25 20:04:27 -0500 (Wed, 25 Jun 2008) | 6 lines

Update sample configuration to match what are now the defaults for the prefix.
(closes issue ASTERISK-12177, related to issue ASTERISK-11627)
Reported by: pabelanger
Patches:
      http.conf.diff2 uploaded by pabelanger (license 224)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=125191

By: Digium Subversion (svnbot) 2008-06-25 20:06:40

Repository: asterisk
Revision: 125192

_U  branches/1.6.0/
U   branches/1.6.0/configs/http.conf.sample

------------------------------------------------------------------------
r125192 | tilghman | 2008-06-25 20:06:38 -0500 (Wed, 25 Jun 2008) | 14 lines

Merged revisions 125191 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r125191 | tilghman | 2008-06-25 20:11:43 -0500 (Wed, 25 Jun 2008) | 6 lines

Update sample configuration to match what are now the defaults for the prefix.
(closes issue ASTERISK-12177, related to issue ASTERISK-11627)
Reported by: pabelanger
Patches:
      http.conf.diff2 uploaded by pabelanger (license 224)

........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=125192