Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

_http_outgoing.js:351 throw new TypeError('The header content contains invalid characters'); ^ #303

Closed
kimbeast opened this issue Feb 14, 2016 · 14 comments

Comments

@kimbeast
Copy link

Environment :

Windows 10 64bit, nodejs 4.3.x and nodejs 5.6.x

Issue :

Trying to connect after starting with "npm start", http-server die with follwing error.

_http_outgoing.js:351
      throw new TypeError('The header content contains invalid characters');
      ^

TypeError: The header content contains invalid characters
    at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:351:13)
    at ResponseStream.(anonymous function) [as setHeader] (C:\SourceIgloo\0.Studying\AngularJS\angular-phonecat\node_modules\http-server\node_modules\union\lib\response-stream.js:86:34)
    at serve (C:\SourceIgloo\0.Studying\AngularJS\angular-phonecat\node_modules\http-server\node_modules\ecstatic\lib\ecstatic.js:146:11)
    at C:\SourceIgloo\0.Studying\AngularJS\angular-phonecat\node_modules\http-server\node_modules\ecstatic\lib\ecstatic.js:139:9
    at FSReqWrap.oncomplete (fs.js:82:15)

Solution :

need to upgrade http-server to 0.8.5

In package.json

"http-server": "^0.8.5"
@inithink
Copy link

It doesn't solve the problem in my environment...
(Windows 10 64bit, nodejs 4.3)

@inithink
Copy link

Solution : upgrade karma

@DanGld
Copy link

DanGld commented Feb 24, 2016

Solution: upgrade karma

How to do this?

@inithink
Copy link

maybe...
npm install karma --save
(you should see package.json file and update karma related packages)

@DanGld
Copy link

DanGld commented Feb 25, 2016

Solved: OS language wasn't english, so chars in header were not identified -> TypeError('The header content contains invalid characters')

@igoradamenko
Copy link

@DanGld Change OS lang because framework's example does not work? No.

Try npm install http-server -D. More info in PR: #311

@HBXSZ
Copy link

HBXSZ commented Mar 18, 2016

why "http-server": "^0.8.5" isn't work on my issue? Throw the same err:TypeError: The header content contains invalid characters
node v4
npm v2

@igoradamenko
Copy link

@HBXSZ try the 0.9.0 version. check the PR: #311

@HBXSZ
Copy link

HBXSZ commented Mar 18, 2016

@igoradamenko yep! It works fine,thanks a lot!

@Zenfeder
Copy link

@igoradamenko Thanks,It works fine!!!

@seeallsea
Copy link

Yes, 0.9.0 version works fine on my environment!

@Aslan1992
Copy link

Changing version to 0.9.0 works well!

@Themercee
Copy link

Yeah! I got the same problem and you solve my issue 👍

gkalpak added a commit to gkalpak/angular-phonecat that referenced this issue Apr 11, 2016
…s for the post-1.5.0 era

This commit and the accompanying updates to the tutorial steps constitute a major re-structuring of
the tutorial app's codebase, aiming at applying established best practices (in terms of file
naming/layout and code organization) and utilizing several new features and enhancements (most
notably components) introduced in recent versions of Angular (especially v1.5).

Apart from the overall changes, two new chapters were introduced: one on components and one on code
organization.

--
In the process several other things were (incidentally) taken care of, including:

* Dependencies were upgraded to latest versions.
* Animations were polished.
* Outdated links were updated.

--
This was inspired by (and loosely based on) angular#289.
Mad props to @teropa for leading the way :)

Fixes angular#198
Fixes angular#214
Fixes angular#224
Fixes angular#230
Fixes angular#243
Fixes angular#246
Fixes angular#252
Fixes angular#277
Fixes angular#286
Fixes angular#295
Fixes angular#303
Fixes angular#304
Fixes angular#323
Fixes angular#324

Closes angular#268
Closes angular#270
Closes angular#278
Closes angular#280
Closes angular#289
Closes angular#309
Closes angular#311
Closes angular#319
gkalpak added a commit to gkalpak/angular-phonecat that referenced this issue Apr 11, 2016
…s for the post-1.5.0 era

This commit and the accompanying updates to the tutorial steps constitute a major re-structuring of
the tutorial app's codebase, aiming at applying established best practices (in terms of file
naming/layout and code organization) and utilizing several new features and enhancements (most
notably components) introduced in recent versions of Angular (especially v1.5).

Apart from the overall changes, two new chapters were introduced: one on components and one on code
organization.

--
In the process several other things were (incidentally) taken care of, including:

* Dependencies were upgraded to latest versions.
* Animations were polished.
* Outdated links were updated.
* The app's base URL was changed to `/` (instead of `/app/`).

--
This was inspired by (and loosely based on) angular#289.
Mad props to @teropa for leading the way :)

--
The old version of the tutorial, that is compatible with Angular version 1.4 or older, has been
saved in the `pre-v1.5.0-snapshot` branch. The `v1.4.x` version of the tutorial should be pointed
to that branch instead of `master`.

Fixes angular#198
Fixes angular#214
Fixes angular#224
Fixes angular#230
Fixes angular#243
Fixes angular#246
Fixes angular#252
Fixes angular#277
Fixes angular#286
Fixes angular#295
Fixes angular#303
Fixes angular#304
Fixes angular#323
Fixes angular#324

Closes angular#268
Closes angular#270
Closes angular#278
Closes angular#280
Closes angular#289
Closes angular#309
Closes angular#311
Closes angular#319
gkalpak added a commit to gkalpak/angular-phonecat that referenced this issue Apr 11, 2016
…s for the post-1.5.0 era

This commit and the accompanying updates to the tutorial steps constitute a major re-structuring of
the tutorial app's codebase, aiming at applying established best practices (in terms of file
naming/layout and code organization) and utilizing several new features and enhancements (most
notably components) introduced in recent versions of Angular (especially v1.5).

Apart from the overall changes, two new chapters were introduced: one on components and one on code
organization.

--
In the process several other things were (incidentally) taken care of, including:

* Dependencies were upgraded to latest versions.
* Animations were polished.
* Outdated links were updated.
* The app's base URL was changed to `/` (instead of `/app/`).

BTW, I have tested with the following versions on Node (on Windows 10) and everything seems to work fine:

* 0.11.16
* 4.2.6
* 4.4.2
* 5.10.0

--
This was inspired by (and loosely based on) angular#289.
Mad props to @teropa for leading the way :)

--
The old version of the tutorial, that is compatible with Angular version 1.4 or older, has been
saved in the `pre-v1.5.0-snapshot` branch. The `v1.4.x` version of the tutorial should be pointed
to that branch instead of `master`.

Fixes angular#198
Fixes angular#214
Fixes angular#224
Fixes angular#230
Fixes angular#243
Fixes angular#246
Fixes angular#252
Fixes angular#277
Fixes angular#286
Fixes angular#295
Fixes angular#303
Fixes angular#304
Fixes angular#323
Fixes angular#324

Closes angular#268
Closes angular#270
Closes angular#278
Closes angular#280
Closes angular#289
Closes angular#309
Closes angular#311
Closes angular#319
gkalpak added a commit to gkalpak/angular-phonecat that referenced this issue Apr 12, 2016
…s for the post-1.5.0 era

This commit and the accompanying updates to the tutorial steps constitute a major re-structuring of
the tutorial app's codebase, aiming at applying established best practices (in terms of file
naming/layout and code organization) and utilizing several new features and enhancements (most
notably components) introduced in recent versions of Angular (especially v1.5).

Apart from the overall changes, two new chapters were introduced: one on components and one on code
organization.

--
In the process, several other things were (incidentally) taken care of, including:

* Dependencies were upgraded to latest versions.
* Animations were polished.
* Outdated links were updated.
* The app's base URL was changed to `/` (instead of `/app/`).

BTW, this has been tested with the following versions of Node (on Windows 10) and everything worked
fine:

* 0.11.16
* 4.2.6
* 4.4.2
* 5.10.0

--
This was inspired by (and loosely based on) angular#289.
Mad props to @teropa for leading the way :)

--
**Note:**
The old version of the tutorial, that is compatible with Angular version 1.4 or older, has been
saved on the `pre-v1.5.0-snapshot` branch. The `v1.4.x` version of the tutorial should be pointed
to that branch instead of `master`.

--
Related to angular/angular.js#14416.
Related to angular/angular-seed#329.
Related to angular/angular-seed#333.

---
Fixes angular#198
Fixes angular#214
Fixes angular#224
Fixes angular#230
Fixes angular#243
Fixes angular#246
Fixes angular#252
Fixes angular#277
Fixes angular#286
Fixes angular#295
Fixes angular#303
Fixes angular#304
Fixes angular#323
Fixes angular#324

Closes angular#268
Closes angular#270
Closes angular#278
Closes angular#280
Closes angular#289
Closes angular#309
Closes angular#311
Closes angular#319
@martinlong77
Copy link

@igoradamenko Thanks,that's the anwser.

gkalpak added a commit that referenced this issue May 24, 2016
…s for the post-1.5.0 era

This commit and the accompanying updates to the tutorial steps constitute a major re-structuring of
the tutorial app's codebase, aiming at applying established best practices (in terms of file
naming/layout and code organization) and utilizing several new features and enhancements (most
notably components) introduced in recent versions of Angular (especially v1.5).

Apart from the overall changes, two new chapters were introduced: one on components and one on code
organization.

--
In the process, several other things were (incidentally) taken care of, including:

* Dependencies were upgraded to latest versions.
* Animations were polished.
* Outdated links were updated.
* The app's base URL was changed to `/` (instead of `/app/`).

BTW, this has been tested with the following versions of Node (on Windows 10) and everything worked
fine:

* 0.11.16
* 4.2.6
* 4.4.2
* 5.10.0

--
This was inspired by (and loosely based on) #289.
Mad props to @teropa for leading the way :)

--
**Note:**
The old version of the tutorial, that is compatible with Angular version 1.4 or older, has been
saved on the `pre-v1.5.0-snapshot` branch. The `v1.4.x` version of the tutorial should be pointed
to that branch instead of `master`.

--
Related to angular/angular.js#14416.
Related to angular/angular-seed#329.
Related to angular/angular-seed#333.

---
Fixes #198
Fixes #214
Fixes #224
Fixes #230
Fixes #243
Fixes #246
Fixes #252
Fixes #277
Fixes #286
Fixes #295
Fixes #303
Fixes #304
Fixes #323
Fixes #324

Closes #268
Closes #270
Closes #278
Closes #280
Closes #289
Closes #309
Closes #311
Closes #319
gkalpak added a commit that referenced this issue May 24, 2016
…s for the post-1.5.0 era

This commit and the accompanying updates to the tutorial steps constitute a major re-structuring of
the tutorial app's codebase, aiming at applying established best practices (in terms of file
naming/layout and code organization) and utilizing several new features and enhancements (most
notably components) introduced in recent versions of Angular (especially v1.5).

Apart from the overall changes, two new chapters were introduced: one on components and one on code
organization.

--
In the process, several other things were (incidentally) taken care of, including:

* Dependencies were upgraded to latest versions.
* Animations were polished.
* Outdated links were updated.
* The app's base URL was changed to `/` (instead of `/app/`).

BTW, this has been tested with the following versions of Node (on Windows 10) and everything worked
fine:

* 0.11.16
* 4.2.6
* 4.4.2
* 5.10.0

--
This was inspired by (and loosely based on) #289.
Mad props to @teropa for leading the way :)

--
**Note:**
The old version of the tutorial, that is compatible with Angular version 1.4 or older, has been
saved on the `pre-v1.5.0-snapshot` branch. The `v1.4.x` version of the tutorial should be pointed
to that branch instead of `master`.

--
Related to angular/angular.js#14416.
Related to angular/angular-seed#329.
Related to angular/angular-seed#333.

---
Fixes #198
Fixes #214
Fixes #224
Fixes #230
Fixes #243
Fixes #246
Fixes #252
Fixes #277
Fixes #286
Fixes #295
Fixes #303
Fixes #304
Fixes #323
Fixes #324

Closes #268
Closes #270
Closes #278
Closes #280
Closes #289
Closes #309
Closes #311
Closes #319
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants