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

Unicode in process.title causes failure #136

Closed
xiaoping0x opened this issue Nov 21, 2016 · 3 comments
Closed

Unicode in process.title causes failure #136

xiaoping0x opened this issue Nov 21, 2016 · 3 comments
Assignees
Labels
Milestone

Comments

@xiaoping0x
Copy link

errors:

The header content contains invalid characters

cause: https://github.com/macbre/analyze-css/blob/devel/lib/runner.js#L25

function getUserAgent() {
	var format = require('util').format,
		version = require('../package').version;

	return format(
		'analyze-css/%s (%s %s, %s %s)',
		version,
		// Unicode process title cause faliure
		process.title,
		process.version,
		process.platform,
		process.arch
	);
}
@macbre
Copy link
Owner

macbre commented Nov 21, 2016

Interesting, process.title should be "node". How does process object look like in your case?

@macbre macbre added the bug label Nov 21, 2016
@xiaoping0x
Copy link
Author

Run under windows administrator mode:

analyze-css --url http://localhost:3000

Error details:

  analyze-css:http Options: {"url":"http://localhost:3000","headers":{"User-Agent":"analyze-css/0.12.3 (管理员: C:\\Wind
ows\\system32\\cmd.exe - node_modules\\.bin\\analyze-css  --url http://localhost:3000 v6.9.1, win32 x64)"},"agent":{"dom
ain":null,"_events":{},"_eventsCount":1,"defaultPort":80,"protocol":"http:","options":{"path":null},"requests":{},"socke
ts":{},"freeSockets":{},"keepAliveMsecs":1000,"keepAlive":false,"maxSockets":null,"maxFreeSockets":256}} +1ms

@macbre macbre added this to the v0.13 milestone Nov 23, 2016
@macbre macbre changed the title Unicode process title cause faliure Unicode in process.title causes failure Nov 23, 2016
@macbre macbre self-assigned this Nov 23, 2016
macbre added a commit that referenced this issue Nov 23, 2016
Using process.title causes "The header content contains invalid characters" in some cases.

Fixes #136
@macbre
Copy link
Owner

macbre commented Nov 23, 2016

Fixed by #137 and published to npm as [email protected]

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

No branches or pull requests

2 participants