Explorar el Código

Fixed server to server .js files with utf8 encoding.

Herbert Vojčík hace 12 años
padre
commit
3300f2ab5c
Se han modificado 2 ficheros con 138 adiciones y 160 borrados
  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

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 132 - 156
server/server.js


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio