Przeglądaj źródła

Fixed server to server .js files with utf8 encoding.

Herbert Vojčík 12 lat temu
rodzic
commit
3300f2ab5c
2 zmienionych plików z 138 dodań i 160 usunięć
  1. 6 4
      server/FileServer.st
  2. 132 156
      server/server.js

+ 6 - 4
server/FileServer.st

@@ -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

Plik diff jest za duży
+ 132 - 156
server/server.js


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików