~ubuntu-branches/ubuntu/utopic/haproxy/utopic-proposed

« back to all changes in this revision

Viewing changes to src/backend.c

  • Committer: Package Import Robot
  • Author(s): Vincent Bernat, Apollon Oikonomopoulos, Vincent Bernat, Prach Pongpanich
  • Date: 2013-05-06 20:02:14 UTC
  • mfrom: (1.1.12)
  • Revision ID: package-import@ubuntu.com-20130506200214-36s6p81fsa5zqybt
Tags: 1.4.23-1
[ Apollon Oikonomopoulos ]
* New upstream version (Closes: #643650, #678953)
   + This fixes CVE-2012-2942 (Closes: #674447)
   + This fixes CVE-2013-1912 (Closes: #704611)
* Ship vim addon as vim-haproxy (Closes: #702893)
* Check for the configuration file after sourcing /etc/default/haproxy
  (Closes: #641762)
* Use /dev/log for logging by default (Closes: #649085)

[ Vincent Bernat ]
* debian/control:
   + add Vcs-* fields
   + switch maintenance to Debian HAProxy team. (Closes: #706890)
   + drop dependency to quilt: 3.0 (quilt) format is in use.
* debian/rules:
   + don't explicitly call dh_installchangelog.
   + use dh_installdirs to install directories.
   + use dh_install to install error and configuration files.
   + switch to `linux2628` Makefile target for Linux.
* debian/postrm:
   + remove haproxy user and group on purge.
* Ship a more minimal haproxy.cfg file: no `listen` blocks but `global`
  and `defaults` block with appropriate configuration to use chroot and
  logging in the expected way.

[ Prach Pongpanich ]
* debian/copyright:
   + add missing copyright holders
   + update years of copyright
* debian/rules:
   + build with -Wl,--as-needed to get rid of unnecessary depends
* Remove useless files in debian/haproxy.{docs,examples}
* Update debian/watch file, thanks to Bart Martens

Show diffs side-by-side

added added

removed removed

Lines of Context:
159
159
                        if (slashes == px->uri_dirs_depth1) /* depth+1 */
160
160
                                break;
161
161
                }
162
 
                else if (c == '?')
 
162
                else if (c == '?' && !px->uri_whole)
163
163
                        break;
164
164
 
165
165
                hash = c + (hash << 6) + (hash << 16) - hash;
480
480
 
481
481
        s->srv = NULL;
482
482
        if (s->be->lbprm.algo & BE_LB_KIND) {
483
 
                int len;
484
483
                /* we must check if we have at least one server available */
485
484
                if (!s->be->lbprm.tot_weight) {
486
485
                        err = SRV_STATUS_NOSRV;
518
517
                        switch (s->be->lbprm.algo & BE_LB_PARM) {
519
518
                        case BE_LB_HASH_SRC:
520
519
                                if (s->cli_addr.ss_family == AF_INET)
521
 
                                        len = 4;
 
520
                                        s->srv = get_server_sh(s->be,
 
521
                                                               (void *)&((struct sockaddr_in *)&s->cli_addr)->sin_addr,
 
522
                                                               4);
522
523
                                else if (s->cli_addr.ss_family == AF_INET6)
523
 
                                        len = 16;
 
524
                                        s->srv = get_server_sh(s->be,
 
525
                                                               (void *)&((struct sockaddr_in6 *)&s->cli_addr)->sin6_addr,
 
526
                                                               16);
524
527
                                else {
525
528
                                        /* unknown IP family */
526
529
                                        err = SRV_STATUS_INTERNAL;
527
530
                                        goto out;
528
531
                                }
529
 
                
530
 
                                s->srv = get_server_sh(s->be,
531
 
                                                       (void *)&((struct sockaddr_in *)&s->cli_addr)->sin_addr,
532
 
                                                       len);
533
532
                                break;
534
533
 
535
534
                        case BE_LB_HASH_URI:
1095
1094
                curproxy->lbprm.algo &= ~BE_LB_ALGO;
1096
1095
                curproxy->lbprm.algo |= BE_LB_ALGO_UH;
1097
1096
 
 
1097
                curproxy->uri_whole = 0;
 
1098
 
1098
1099
                while (*args[arg]) {
1099
1100
                        if (!strcmp(args[arg], "len")) {
1100
1101
                                if (!*args[arg+1] || (atoi(args[arg+1]) <= 0)) {
1115
1116
                                curproxy->uri_dirs_depth1 = atoi(args[arg+1]) + 1;
1116
1117
                                arg += 2;
1117
1118
                        }
 
1119
                        else if (!strcmp(args[arg], "whole")) {
 
1120
                                curproxy->uri_whole = 1;
 
1121
                                arg += 1;
 
1122
                        }
1118
1123
                        else {
1119
 
                                snprintf(err, errlen, "'balance uri' only accepts parameters 'len' and 'depth' (got '%s').", args[arg]);
 
1124
                                snprintf(err, errlen, "'balance uri' only accepts parameters 'len', 'depth', and 'while' (got '%s').", args[arg]);
1120
1125
                                return -1;
1121
1126
                        }
1122
1127
                }