Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Trailer name must be a valid HTTP Token ["Content-Type:"] #91

Open
PiotrChojniak opened this issue Jul 26, 2016 · 2 comments

Comments

@PiotrChojniak
Copy link

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)

@FatihBekdemir
Copy link

FatihBekdemir commented Aug 18, 2016

Found it!
replace all
res.setHeader('Content-Type:', 'application/json');
by
res.setHeader('Content-Type', 'application/json');

@swizzmagik
Copy link

This error exists in other sample apps too... I found it around line 155 of routes in the \todo-angular\server\routes.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants