Skip to content

Commit 20000d1

Browse files
committed
Add configs for BlackBerry Maps location documents
Ensure that `.xloc` text files will: * be served with the `text/vnd.rim.location.xloc ` media type * have their character encoding specified as `UTF-8` * be compressed (they are basically XML files, therefore, they compress quite nicely) * not be served with any of the `HTML` document related headers Ref: http://www.manualslib.com/manual/368494/Blackberry-Java-Development-Environment-Gps-And-Maps-Development-Guide.html?page=28 http://docs.blackberry.com/en/developers/deliverables/18168/BlackBerry_Browser-Feature_and_Technical_Overview--1214041-0804111258-001-6.0-US.pdf Ref: #43
1 parent ef58054 commit 20000d1

File tree

12 files changed

+31
-14
lines changed

12 files changed

+31
-14
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
### HEAD
22

3+
* Add configs for BlackBerry Maps location documents (`.xloc`).
34
* Add configs for BlackBerry App World files (`.bbaw`)
45
[[352fb62](https://github.com/h5bp/server-configs-apache/commit/352fb62daae4b57cf605c1eb3a836385f6f7e01f)].
56

dist/.htaccess

+7-4
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Options -MultiViews
128128
# the `X-UA-Compatible` response header should be send only for
129129
# HTML documents and not for the other resources.
130130

131-
<FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
131+
<FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xloc|xml|xpi)$">
132132
Header unset X-UA-Compatible
133133
</FilesMatch>
134134

@@ -243,6 +243,7 @@ Options -MultiViews
243243
AddType application/xml atom rdf rss xml
244244
AddType image/webp webp
245245
AddType image/x-icon cur ico
246+
AddType text/vnd.rim.location.xloc xloc
246247
AddType text/vtt vtt
247248
AddType text/x-component htc
248249
AddType text/x-vcard vcf
@@ -271,6 +272,7 @@ AddDefaultCharset utf-8
271272
.topojson \
272273
.vtt \
273274
.webapp \
275+
.xloc \
274276
.xml
275277
</IfModule>
276278

@@ -429,7 +431,7 @@ AddDefaultCharset utf-8
429431
# # the `X-Frame-Options` response header should be send only for
430432
# # HTML documents and not for the other resources.
431433

432-
# <FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
434+
# <FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xloc|xml|xpi)$">
433435
# Header unset X-Frame-Options
434436
# </FilesMatch>
435437

@@ -463,7 +465,7 @@ AddDefaultCharset utf-8
463465
# # the `Content-Security-Policy` response header should be send
464466
# # only for HTML documents and not for the other resources.
465467

466-
# <FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
468+
# <FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xloc|xml|xpi)$">
467469
# Header unset Content-Security-Policy
468470
# </FilesMatch>
469471

@@ -630,7 +632,7 @@ AddDefaultCharset utf-8
630632
# # the `X-XSS-Protection` response header should be send only for
631633
# # HTML documents and not for the other resources.
632634

633-
# <FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
635+
# <FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xloc|xml|xpi)$">
634636
# Header unset X-XSS-Protection
635637
# </FilesMatch>
636638

@@ -720,6 +722,7 @@ AddDefaultCharset utf-8
720722
"text/html" \
721723
"text/javascript" \
722724
"text/plain" \
725+
"text/vnd.rim.location.xloc" \
723726
"text/vtt" \
724727
"text/x-component" \
725728
"text/xml"

src/internet_explorer/x-ua-compatible.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# the `X-UA-Compatible` response header should be send only for
2222
# HTML documents and not for the other resources.
2323

24-
<FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
24+
<FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xloc|xml|xpi)$">
2525
Header unset X-UA-Compatible
2626
</FilesMatch>
2727

src/media_types_and_character_encodings/character_encodings.conf

+1
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ AddDefaultCharset utf-8
2020
.topojson \
2121
.vtt \
2222
.webapp \
23+
.xloc \
2324
.xml
2425
</IfModule>

src/media_types_and_character_encodings/media_types.conf

+1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
AddType application/xml atom rdf rss xml
9090
AddType image/webp webp
9191
AddType image/x-icon cur ico
92+
AddType text/vnd.rim.location.xloc xloc
9293
AddType text/vtt vtt
9394
AddType text/x-component htc
9495
AddType text/x-vcard vcf

src/security/content-security-policy.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# the `Content-Security-Policy` response header should be send
2727
# only for HTML documents and not for the other resources.
2828

29-
<FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
29+
<FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xloc|xml|xpi)$">
3030
Header unset Content-Security-Policy
3131
</FilesMatch>
3232

src/security/x-frame-option.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
# the `X-Frame-Options` response header should be send only for
4141
# HTML documents and not for the other resources.
4242

43-
<FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
43+
<FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xloc|xml|xpi)$">
4444
Header unset X-Frame-Options
4545
</FilesMatch>
4646

src/security/x-xss-protection.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
# the `X-XSS-Protection` response header should be send only for
4444
# HTML documents and not for the other resources.
4545

46-
<FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
46+
<FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xloc|xml|xpi)$">
4747
Header unset X-XSS-Protection
4848
</FilesMatch>
4949

src/web_performance/compression.conf

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"text/html" \
6464
"text/javascript" \
6565
"text/plain" \
66+
"text/vnd.rim.location.xloc" \
6667
"text/vtt" \
6768
"text/x-component" \
6869
"text/xml"

test/fixtures/.htaccess

+7-4
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Options -MultiViews
108108
# the `X-UA-Compatible` response header should be send only for
109109
# HTML documents and not for the other resources.
110110

111-
<FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
111+
<FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xloc|xml|xpi)$">
112112
Header unset X-UA-Compatible
113113
</FilesMatch>
114114

@@ -223,6 +223,7 @@ Options -MultiViews
223223
AddType application/xml atom rdf rss xml
224224
AddType image/webp webp
225225
AddType image/x-icon cur ico
226+
AddType text/vnd.rim.location.xloc xloc
226227
AddType text/vtt vtt
227228
AddType text/x-component htc
228229
AddType text/x-vcard vcf
@@ -251,6 +252,7 @@ AddDefaultCharset utf-8
251252
.topojson \
252253
.vtt \
253254
.webapp \
255+
.xloc \
254256
.xml
255257
</IfModule>
256258

@@ -396,7 +398,7 @@ AddDefaultCharset utf-8
396398
# the `X-Frame-Options` response header should be send only for
397399
# HTML documents and not for the other resources.
398400

399-
<FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
401+
<FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xloc|xml|xpi)$">
400402
Header unset X-Frame-Options
401403
</FilesMatch>
402404

@@ -430,7 +432,7 @@ AddDefaultCharset utf-8
430432
# the `Content-Security-Policy` response header should be send
431433
# only for HTML documents and not for the other resources.
432434

433-
<FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
435+
<FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xloc|xml|xpi)$">
434436
Header unset Content-Security-Policy
435437
</FilesMatch>
436438

@@ -597,7 +599,7 @@ AddDefaultCharset utf-8
597599
# the `X-XSS-Protection` response header should be send only for
598600
# HTML documents and not for the other resources.
599601

600-
<FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xml|xpi)$">
602+
<FilesMatch "\.(appcache|atom|bbaw|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcf|vtt|webapp|web[mp]|woff2?|xloc|xml|xpi)$">
601603
Header unset X-XSS-Protection
602604
</FilesMatch>
603605

@@ -673,6 +675,7 @@ AddDefaultCharset utf-8
673675
"text/html" \
674676
"text/javascript" \
675677
"text/plain" \
678+
"text/vnd.rim.location.xloc" \
676679
"text/vtt" \
677680
"text/x-component" \
678681
"text/xml"

test/fixtures/test.xloc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<lbs id='Kit' >
2+
<location lon='-0802300' lat='4327000' label='Kitchener, ON' description='Kitchener' zoom='10'/>
3+
</lbs>

test/tests.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ exports = module.exports = {
9494

9595
'test.bbaw': {
9696
responseHeaders: {
97-
'cache-control': 'max-age=2592000, no-transform',
9897
'content-encoding': null,
9998
'content-type': 'application/x-bb-appworld; charset=utf-8'
10099
}
@@ -135,7 +134,6 @@ exports = module.exports = {
135134

136135
'test.f4a': {
137136
responseHeaders: {
138-
'cache-control': 'max-age=2592000, no-transform',
139137
'content-encoding': null,
140138
'content-type': 'audio/mp4'
141139
}
@@ -496,6 +494,12 @@ exports = module.exports = {
496494
}
497495
},
498496

497+
'test.xloc': {
498+
responseHeaders: {
499+
'content-type': 'text/vnd.rim.location.xloc; charset=utf-8'
500+
}
501+
},
502+
499503
'test.xml': {
500504
responseHeaders: {
501505
'cache-control': 'max-age=0, no-transform',

0 commit comments

Comments
 (0)