~ubuntu-branches/ubuntu/hardy/lighttpd/hardy

« back to all changes in this revision

Viewing changes to src/request.c

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen
  • Date: 2007-05-01 13:15:59 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20070501131559-y8jos9wp79uf3pp4
Tags: 1.4.15-1ubuntu1
* Merge from Debian unstable. Remaining Ubuntu changes:
  - Add fam/gamin stat cache engine support
  - Clean environment in init.d script
  - Replace Depends: on perl with Depends: on libterm-readline-perl-perl
  - Make sure that upgrades succeed, even if we can't restart lighttpd
  - DebianMaintainerField update

Show diffs side-by-side

added added

removed removed

Lines of Context:
85
85
        /* Host is empty */
86
86
        if (host_len == 0) return -1;
87
87
 
 
88
        /* if the hostname ends in a "." strip it */
 
89
        if (host->ptr[host_len-1] == '.') host_len -= 1;
 
90
 
88
91
        /* scan from the right and skip the \0 */
89
92
        for (i = host_len - 1; i + 1 > 0; i--) {
90
93
                const char c = host->ptr[i];
741
744
 
742
745
                                                s_len = cur - value;
743
746
 
 
747
                                                /* strip trailing white-spaces */
 
748
                                                for (; s_len > 0 && 
 
749
                                                                (value[s_len - 1] == ' ' || 
 
750
                                                                 value[s_len - 1] == '\t'); s_len--);
 
751
 
 
752
                                                value[s_len] = '\0';
 
753
 
744
754
                                                if (s_len > 0) {
745
755
                                                        int cmp = 0;
746
756
                                                        if (NULL == (ds = (data_string *)array_get_unused_element(con->request.headers, TYPE_STRING))) {