2
0
Selaa lähdekoodia

Fixed server to server .js files with utf8 encoding.

Herbert Vojčík 12 vuotta sitten
vanhempi
commit
3300f2ab5c
2 muutettua tiedostoa jossa 138 lisäystä ja 160 poistoa
  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

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 132 - 156
server/server.js


Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä