| 1 | diff -Nau buildroot/build_arm_nofpu/lighttpd-1.4.13/src/request.c buildroot-master/buildroot-arm/lighttpd-1.4.13/src/request.c |
|---|
| 2 | --- buildroot/build_arm_nofpu/lighttpd-1.4.13/src/request.c 2007-04-25 12:45:44.000000000 +0100 |
|---|
| 3 | +++ buildroot-master/buildroot-arm/lighttpd-1.4.13/src/request.c 2006-10-04 14:29:17.000000000 +0100 |
|---|
| 4 | @@ -27,7 +27,7 @@ |
|---|
| 5 | * host = hostname | IPv4address | IPv6address |
|---|
| 6 | * hostname = *( domainlabel "." ) toplabel [ "." ] |
|---|
| 7 | * domainlabel = alphanum | alphanum *( alphanum | "-" ) alphanum |
|---|
| 8 | - * toplabel = alphanum | alphanum *( alphanum | "-" ) alphanum |
|---|
| 9 | + * toplabel = alpha | alpha *( alphanum | "-" ) alphanum |
|---|
| 10 | * IPv4address = 1*digit "." 1*digit "." 1*digit "." 1*digit |
|---|
| 11 | * IPv6address = "[" ... "]" |
|---|
| 12 | * port = *digit |
|---|
| 13 | @@ -120,12 +120,12 @@ |
|---|
| 14 | /* just a dot and nothing else is evil */ |
|---|
| 15 | return -1; |
|---|
| 16 | } |
|---|
| 17 | -// } else if (i == 0) { |
|---|
| 18 | -// /* the first character of the hostname */ |
|---|
| 19 | -// if (!light_isalpha(c)) { |
|---|
| 20 | -// return -1; |
|---|
| 21 | -// } |
|---|
| 22 | -// label_len++; |
|---|
| 23 | + } else if (i == 0) { |
|---|
| 24 | + /* the first character of the hostname */ |
|---|
| 25 | + if (!light_isalpha(c)) { |
|---|
| 26 | + return -1; |
|---|
| 27 | + } |
|---|
| 28 | + label_len++; |
|---|
| 29 | } else { |
|---|
| 30 | if (c != '-' && !light_isalnum(c)) { |
|---|
| 31 | return -1; |
|---|