Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
*) Feature: the "stub" parameter in the "include" SSI command. *) Feature: the "block" SSI command. *) Feature: the unicode2nginx script was added to contrib. *) Bugfix: if a "root" was specified by variable only, then the root was relative to a server prefix. *) Bugfix: if the request contained "//" or "/./" and escaped symbols after them, then the proxied request was sent unescaped. *) Bugfix: the $r->headers_in("Cookie") of the ngx_http_perl_module now returns all "Cookie" header lines. *) Bugfix: a segmentation fault occurred if "client_body_in_file_only on" was used and nginx switched to a next upstream. *) Bugfix: on some condition while reconfiguration character codes inside the "charset_map" may be treated invalid; bug appeared in 0.3.50.
- Loading branch information
1 parent
9909025
commit 794e7a3
Showing
48 changed files
with
871 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,6 +1,15 @@ | |||
|
|
||
geo2nginx.pl by Andrei Nigmatulin | geo2nginx.pl by Andrei Nigmatulin | ||
|
|||
The perl script to convert CSV geoip database ( free download | |||
at http://www.maxmind.com/app/geoip_country ) to format, suitable | |||
for use by the ngx_http_geo_module. | |||
|
|||
|
|||
unicode2nginx by Maxim Dounin | |||
|
|||
The perl script to convert unicode mappings ( available | |||
at http://www.unicode.org/Public/MAPPINGS/ ) to the nginx | |||
configuration file format. | |||
Two generated full maps for windows-1251 and koi8-r. | |||
|
|
||
The perl script to convert CSV geoip database (free download | |||
at http://www.maxmind.com/app/geoip_country) to format, suitable | |||
for use with ngx_http_geo_module. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,131 @@ | |||
charset_map koi8-r utf-8 { | |||
|
|||
80 E29480 ; # BOX DRAWINGS LIGHT HORIZONTAL | |||
81 E29482 ; # BOX DRAWINGS LIGHT VERTICAL | |||
82 E2948C ; # BOX DRAWINGS LIGHT DOWN AND RIGHT | |||
83 E29490 ; # BOX DRAWINGS LIGHT DOWN AND LEFT | |||
84 E29494 ; # BOX DRAWINGS LIGHT UP AND RIGHT | |||
85 E29498 ; # BOX DRAWINGS LIGHT UP AND LEFT | |||
86 E2949C ; # BOX DRAWINGS LIGHT VERTICAL AND RIGHT | |||
87 E294A4 ; # BOX DRAWINGS LIGHT VERTICAL AND LEFT | |||
88 E294AC ; # BOX DRAWINGS LIGHT DOWN AND HORIZONTAL | |||
89 E294B4 ; # BOX DRAWINGS LIGHT UP AND HORIZONTAL | |||
8A E294BC ; # BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL | |||
8B E29680 ; # UPPER HALF BLOCK | |||
8C E29684 ; # LOWER HALF BLOCK | |||
8D E29688 ; # FULL BLOCK | |||
8E E2968C ; # LEFT HALF BLOCK | |||
8F E29690 ; # RIGHT HALF BLOCK | |||
90 E29691 ; # LIGHT SHADE | |||
91 E29692 ; # MEDIUM SHADE | |||
92 E29693 ; # DARK SHADE | |||
93 E28CA0 ; # TOP HALF INTEGRAL | |||
94 E296A0 ; # BLACK SQUARE | |||
95 E28899 ; # BULLET OPERATOR | |||
96 E2889A ; # SQUARE ROOT | |||
97 E28988 ; # ALMOST EQUAL TO | |||
98 E289A4 ; # LESS-THAN OR EQUAL TO | |||
99 E289A5 ; # GREATER-THAN OR EQUAL TO | |||
9A C2A0 ; # NO-BREAK SPACE | |||
9B E28CA1 ; # BOTTOM HALF INTEGRAL | |||
9C C2B0 ; # DEGREE SIGN | |||
9D C2B2 ; # SUPERSCRIPT TWO | |||
9E C2B7 ; # MIDDLE DOT | |||
9F C3B7 ; # DIVISION SIGN | |||
A0 E29590 ; # BOX DRAWINGS DOUBLE HORIZONTAL | |||
A1 E29591 ; # BOX DRAWINGS DOUBLE VERTICAL | |||
A2 E29592 ; # BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE | |||
A3 D191 ; # CYRILLIC SMALL LETTER IO | |||
A4 E29593 ; # BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE | |||
A5 E29594 ; # BOX DRAWINGS DOUBLE DOWN AND RIGHT | |||
A6 E29595 ; # BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE | |||
A7 E29596 ; # BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE | |||
A8 E29597 ; # BOX DRAWINGS DOUBLE DOWN AND LEFT | |||
A9 E29598 ; # BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE | |||
AA E29599 ; # BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE | |||
AB E2959A ; # BOX DRAWINGS DOUBLE UP AND RIGHT | |||
AC E2959B ; # BOX DRAWINGS UP SINGLE AND LEFT DOUBLE | |||
AD E2959C ; # BOX DRAWINGS UP DOUBLE AND LEFT SINGLE | |||
AE E2959D ; # BOX DRAWINGS DOUBLE UP AND LEFT | |||
AF E2959E ; # BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE | |||
B0 E2959F ; # BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE | |||
B1 E295A0 ; # BOX DRAWINGS DOUBLE VERTICAL AND RIGHT | |||
B2 E295A1 ; # BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE | |||
B3 D081 ; # CYRILLIC CAPITAL LETTER IO | |||
B4 E295A2 ; # BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE | |||
B5 E295A3 ; # BOX DRAWINGS DOUBLE VERTICAL AND LEFT | |||
B6 E295A4 ; # BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE | |||
B7 E295A5 ; # BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE | |||
B8 E295A6 ; # BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL | |||
B9 E295A7 ; # BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE | |||
BA E295A8 ; # BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE | |||
BB E295A9 ; # BOX DRAWINGS DOUBLE UP AND HORIZONTAL | |||
BC E295AA ; # BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE | |||
BD E295AB ; # BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE | |||
BE E295AC ; # BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL | |||
BF C2A9 ; # COPYRIGHT SIGN | |||
C0 D18E ; # CYRILLIC SMALL LETTER YU | |||
C1 D0B0 ; # CYRILLIC SMALL LETTER A | |||
C2 D0B1 ; # CYRILLIC SMALL LETTER BE | |||
C3 D186 ; # CYRILLIC SMALL LETTER TSE | |||
C4 D0B4 ; # CYRILLIC SMALL LETTER DE | |||
C5 D0B5 ; # CYRILLIC SMALL LETTER IE | |||
C6 D184 ; # CYRILLIC SMALL LETTER EF | |||
C7 D0B3 ; # CYRILLIC SMALL LETTER GHE | |||
C8 D185 ; # CYRILLIC SMALL LETTER HA | |||
C9 D0B8 ; # CYRILLIC SMALL LETTER I | |||
CA D0B9 ; # CYRILLIC SMALL LETTER SHORT I | |||
CB D0BA ; # CYRILLIC SMALL LETTER KA | |||
CC D0BB ; # CYRILLIC SMALL LETTER EL | |||
CD D0BC ; # CYRILLIC SMALL LETTER EM | |||
CE D0BD ; # CYRILLIC SMALL LETTER EN | |||
CF D0BE ; # CYRILLIC SMALL LETTER O | |||
D0 D0BF ; # CYRILLIC SMALL LETTER PE | |||
D1 D18F ; # CYRILLIC SMALL LETTER YA | |||
D2 D180 ; # CYRILLIC SMALL LETTER ER | |||
D3 D181 ; # CYRILLIC SMALL LETTER ES | |||
D4 D182 ; # CYRILLIC SMALL LETTER TE | |||
D5 D183 ; # CYRILLIC SMALL LETTER U | |||
D6 D0B6 ; # CYRILLIC SMALL LETTER ZHE | |||
D7 D0B2 ; # CYRILLIC SMALL LETTER VE | |||
D8 D18C ; # CYRILLIC SMALL LETTER SOFT SIGN | |||
D9 D18B ; # CYRILLIC SMALL LETTER YERU | |||
DA D0B7 ; # CYRILLIC SMALL LETTER ZE | |||
DB D188 ; # CYRILLIC SMALL LETTER SHA | |||
DC D18D ; # CYRILLIC SMALL LETTER E | |||
DD D189 ; # CYRILLIC SMALL LETTER SHCHA | |||
DE D187 ; # CYRILLIC SMALL LETTER CHE | |||
DF D18A ; # CYRILLIC SMALL LETTER HARD SIGN | |||
E0 D0AE ; # CYRILLIC CAPITAL LETTER YU | |||
E1 D090 ; # CYRILLIC CAPITAL LETTER A | |||
E2 D091 ; # CYRILLIC CAPITAL LETTER BE | |||
E3 D0A6 ; # CYRILLIC CAPITAL LETTER TSE | |||
E4 D094 ; # CYRILLIC CAPITAL LETTER DE | |||
E5 D095 ; # CYRILLIC CAPITAL LETTER IE | |||
E6 D0A4 ; # CYRILLIC CAPITAL LETTER EF | |||
E7 D093 ; # CYRILLIC CAPITAL LETTER GHE | |||
E8 D0A5 ; # CYRILLIC CAPITAL LETTER HA | |||
E9 D098 ; # CYRILLIC CAPITAL LETTER I | |||
EA D099 ; # CYRILLIC CAPITAL LETTER SHORT I | |||
EB D09A ; # CYRILLIC CAPITAL LETTER KA | |||
EC D09B ; # CYRILLIC CAPITAL LETTER EL | |||
ED D09C ; # CYRILLIC CAPITAL LETTER EM | |||
EE D09D ; # CYRILLIC CAPITAL LETTER EN | |||
EF D09E ; # CYRILLIC CAPITAL LETTER O | |||
F0 D09F ; # CYRILLIC CAPITAL LETTER PE | |||
F1 D0AF ; # CYRILLIC CAPITAL LETTER YA | |||
F2 D0A0 ; # CYRILLIC CAPITAL LETTER ER | |||
F3 D0A1 ; # CYRILLIC CAPITAL LETTER ES | |||
F4 D0A2 ; # CYRILLIC CAPITAL LETTER TE | |||
F5 D0A3 ; # CYRILLIC CAPITAL LETTER U | |||
F6 D096 ; # CYRILLIC CAPITAL LETTER ZHE | |||
F7 D092 ; # CYRILLIC CAPITAL LETTER VE | |||
F8 D0AC ; # CYRILLIC CAPITAL LETTER SOFT SIGN | |||
F9 D0AB ; # CYRILLIC CAPITAL LETTER YERU | |||
FA D097 ; # CYRILLIC CAPITAL LETTER ZE | |||
FB D0A8 ; # CYRILLIC CAPITAL LETTER SHA | |||
FC D0AD ; # CYRILLIC CAPITAL LETTER E | |||
FD D0A9 ; # CYRILLIC CAPITAL LETTER SHCHA | |||
FE D0A7 ; # CYRILLIC CAPITAL LETTER CHE | |||
FF D0AA ; # CYRILLIC CAPITAL LETTER HARD SIGN | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,45 @@ | |||
#!/usr/bin/perl -w | |||
|
|||
# Convert unicode mappings to nginx configuration file format. | |||
|
|||
# You may find useful mappings in various places, including | |||
# unicode.org official site: | |||
# | |||
# http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1251.TXT | |||
# http://www.unicode.org/Public/MAPPINGS/VENDORS/MISC/KOI8-R.TXT | |||
|
|||
# Needs perl 5.6 or later. | |||
|
|||
# Written by Maxim Dounin, mdounin@rambler-co.ru | |||
|
|||
############################################################################### | |||
|
|||
require 5.006; | |||
|
|||
while (<>) { | |||
# Skip comments and empty lines | |||
|
|||
next if /^#/; | |||
next if /^\s*$/; | |||
chomp; | |||
|
|||
# Convert mappings | |||
|
|||
if (/^\s*0x(..)\s*0x(....)\s*(#.*)/) { | |||
# Mapping <from-code> <unicode-code> "#" <unicode-name> | |||
my $cs_code = $1; | |||
my $un_code = $2; | |||
my $un_name = $3; | |||
|
|||
# Produce UTF-8 sequence from character code; | |||
|
|||
my $un_utf8 = join('', map { sprintf("%02X", $_) } unpack("C*", pack("U", hex($un_code)))); | |||
|
|||
print " $cs_code $un_utf8 ; $un_name\n"; | |||
|
|||
} else { | |||
warn "Unrecognized line: '$_'"; | |||
} | |||
} | |||
|
|||
############################################################################### |
Oops, something went wrong.