@@ -349,7 +349,7 @@ describe('HTTP APIs', function () {
349
349
it ( 'should return resource link for files' , function ( done ) {
350
350
server . get ( '/hello.html' )
351
351
. expect ( 'Link' , / < h t t p : \/ \/ w w w .w 3 .o r g \/ n s \/ l d p # R e s o u r c e > ; r e l = " t y p e " / )
352
- . expect ( 'Content-Type' , ' text/html' )
352
+ . expect ( 'Content-Type' , / t e x t \ /h t m l / )
353
353
. expect ( 200 , done )
354
354
} )
355
355
it ( 'should have glob support' , function ( done ) {
@@ -460,30 +460,30 @@ describe('HTTP APIs', function () {
460
460
describe ( 'HEAD API' , function ( ) {
461
461
it ( 'should return content-type application/octet-stream by default' , function ( done ) {
462
462
server . head ( '/sampleContainer/blank' )
463
- . expect ( 'Content-Type' , ' application/octet-stream; charset=utf-8' )
463
+ . expect ( 'Content-Type' , / a p p l i c a t i o n \ /o c t e t - s t r e a m / )
464
464
. end ( done )
465
465
} )
466
466
it ( 'should return content-type text/turtle for container' , function ( done ) {
467
467
server . head ( '/sampleContainer2/' )
468
- . expect ( 'Content-Type' , ' text/turtle; charset=utf-8' )
468
+ . expect ( 'Content-Type' , / t e x t \ /t u r t l e / )
469
469
. end ( done )
470
470
} )
471
471
it ( 'should have set content-type for turtle files' ,
472
472
function ( done ) {
473
473
server . head ( '/sampleContainer2/example1.ttl' )
474
- . expect ( 'Content-Type' , ' text/turtle; charset=utf-8' )
474
+ . expect ( 'Content-Type' , / t e x t \ /t u r t l e / )
475
475
. end ( done )
476
476
} )
477
477
it ( 'should have set content-type for implicit turtle files' ,
478
478
function ( done ) {
479
479
server . head ( '/sampleContainer/example4' )
480
- . expect ( 'Content-Type' , ' text/turtle; charset=utf-8' )
480
+ . expect ( 'Content-Type' , / t e x t \ /t u r t l e / )
481
481
. end ( done )
482
482
} )
483
483
it ( 'should have set content-type for image files' ,
484
484
function ( done ) {
485
485
server . head ( '/sampleContainer/solid.png' )
486
- . expect ( 'Content-Type' , ' image/png; charset=utf-8' )
486
+ . expect ( 'Content-Type' , / i m a g e \ /p n g / )
487
487
. end ( done )
488
488
} )
489
489
it ( 'should have Access-Control-Allow-Origin as Origin' , function ( done ) {
@@ -517,7 +517,7 @@ describe('HTTP APIs', function () {
517
517
it ( 'should have set Content-Type as text/turtle for Container' ,
518
518
function ( done ) {
519
519
server . head ( '/sampleContainer2/' )
520
- . expect ( 'Content-Type' , ' text/turtle; charset=utf-8' )
520
+ . expect ( 'Content-Type' , / t e x t \ /t u r t l e / )
521
521
. expect ( 200 , done )
522
522
} )
523
523
it ( 'should have set Link as Container/BasicContainer' ,
0 commit comments