Open PiotrChojniak opened 8 years ago
Found it! replace all res.setHeader('Content-Type:', 'application/json'); by res.setHeader('Content-Type', 'application/json');
This error exists in other sample apps too... I found it around line 155 of routes in the \todo-angular\server\routes.js
There is unwanted colon in header name in \zza-node-mongo\server\breeze-routes.js:59:21
Stack trace: TypeError: Trailer name must be a valid HTTP Token ["Content-Type:"] at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:347:13) at c:\Development\AngularTutorial\ng-demos-master\zza-node-mongo\server\breeze-routes.js:59:21 at findCallback (c:\Development\AngularTutorial\ng-demos-master\zza-node-mongo\server\repository.js:123:29) at c:\Development\AngularTutorial\ng-demos-master\zza-node-mongo\node_modules\mongodb\lib\mongodb\cursor.js:180:16 at commandHandler (c:\Development\AngularTutorial\ng-demos-master\zza-node-mongo\node_modules\mongodb\lib\mongodb\cursor.js:734:16) at c:\Development\AngularTutorial\ng-demos-master\zza-node-mongo\node_modules\mongodb\lib\mongodb\db.js:1905:9 at Server.Base._callHandler (c:\Development\AngularTutorial\ng-demos-master\zza-node-mongo\node_modules\mongodb\lib\mongodb\connection\base.js:453:41) at c:\Development\AngularTutorial\ng-demos-master\zza-node-mongo\node_modules\mongodb\lib\mongodb\connection\server.js:488:18 at MongoReply.parseBody (c:\Development\AngularTutorial\ng-demos-master\zza-node-mongo\node_modules\mongodb\lib\mongodb\responses\mongo_reply.js:68:5) at null. (c:\Development\AngularTutorial\ng-demos-master\zza-node-mongo\node_modules\mongodb\lib\mongodb\connection\server.js:446:20)