Skip to content

Commit

Permalink
Merge pull request amber-smalltalk#204 from herby/master
Browse files Browse the repository at this point in the history
Fix local server to serve ';charset=utf-8' for .js files
  • Loading branch information
NicolasPetton committed May 13, 2012
2 parents f47e896 + 3300f2a commit f51425c
Show file tree
Hide file tree
Showing 2 changed files with 4,035 additions and 5,197 deletions.
10 changes: 6 additions & 4 deletions server/FileServer.st
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,13 @@ respondFileNamed: aFilename to: aResponse
ex notNil
ifTrue: [self respondInternalErrorTo: aResponse]
ifFalse: [
type := self class mimeTypeFor: filename.
type := self class mimeTypeFor: filename.
type = 'application/javascript'
ifTrue: [ type:=type,';charset=utf-8' ].
aResponse
writeHead: 200 options: #{'Content-Type' -> type};
write: file binary: 'binary';
end]]
writeHead: 200 options: #{'Content-Type' -> type};
write: file encoding: 'binary';
end]]
!

respondInternalErrorTo: aResponse
Expand Down

0 comments on commit f51425c

Please sign in to comment.