{"action":"opened","number":1,"pull_request":{"url":"https://api.github.com/repos/Invoiced/invoice-generator.js/pulls/1","id":54616280,"html_url":"https://github.com/Invoiced/invoice-generator.js/pull/1","diff_url":"https://github.com/Invoiced/invoice-generator.js/pull/1.diff","patch_url":"https://github.com/Invoiced/invoice-generator.js/pull/1.patch","issue_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/issues/1","number":1,"state":"open","locked":false,"title":"Fix Content-length header","user":{"login":"hverlin","id":9151470,"avatar_url":"https://avatars.githubusercontent.com/u/9151470?v=3","gravatar_id":"","url":"https://api.github.com/users/hverlin","html_url":"https://github.com/hverlin","followers_url":"https://api.github.com/users/hverlin/followers","following_url":"https://api.github.com/users/hverlin/following{/other_user}","gists_url":"https://api.github.com/users/hverlin/gists{/gist_id}","starred_url":"https://api.github.com/users/hverlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hverlin/subscriptions","organizations_url":"https://api.github.com/users/hverlin/orgs","repos_url":"https://api.github.com/users/hverlin/repos","events_url":"https://api.github.com/users/hverlin/events{/privacy}","received_events_url":"https://api.github.com/users/hverlin/received_events","type":"User","site_admin":false},"body":"The best method to compute the \"Content-Length\" is by using ``Buffer.byteLength()``.  \r\n\r\nThe length of a string is not necessarily equal to the number of bytes contained in that string. The byte length depends on the string encoding. UTF-8 uses multiple bytes to encode characters outside the 7-bit ASCII range (0 - 127). Accented characters fall outside that range.\r\n\r\nSee here:\r\nhttp://stackoverflow.com/questions/17922748/what-is-the-correct-method-for-calculating-the-content-length-header-in-node-js","created_at":"2015-12-27T11:50:14Z","updated_at":"2015-12-27T11:50:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/pulls/1/commits","review_comments_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/pulls/1/comments","review_comment_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/issues/1/comments","statuses_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/statuses/a645b34fd55786ad3f40dc45bd52cdc141d58978","head":{"label":"hverlin:master","ref":"master","sha":"a645b34fd55786ad3f40dc45bd52cdc141d58978","user":{"login":"hverlin","id":9151470,"avatar_url":"https://avatars.githubusercontent.com/u/9151470?v=3","gravatar_id":"","url":"https://api.github.com/users/hverlin","html_url":"https://github.com/hverlin","followers_url":"https://api.github.com/users/hverlin/followers","following_url":"https://api.github.com/users/hverlin/following{/other_user}","gists_url":"https://api.github.com/users/hverlin/gists{/gist_id}","starred_url":"https://api.github.com/users/hverlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hverlin/subscriptions","organizations_url":"https://api.github.com/users/hverlin/orgs","repos_url":"https://api.github.com/users/hverlin/repos","events_url":"https://api.github.com/users/hverlin/events{/privacy}","received_events_url":"https://api.github.com/users/hverlin/received_events","type":"User","site_admin":false},"repo":{"id":48642975,"name":"invoice-generator.js","full_name":"hverlin/invoice-generator.js","owner":{"login":"hverlin","id":9151470,"avatar_url":"https://avatars.githubusercontent.com/u/9151470?v=3","gravatar_id":"","url":"https://api.github.com/users/hverlin","html_url":"https://github.com/hverlin","followers_url":"https://api.github.com/users/hverlin/followers","following_url":"https://api.github.com/users/hverlin/following{/other_user}","gists_url":"https://api.github.com/users/hverlin/gists{/gist_id}","starred_url":"https://api.github.com/users/hverlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hverlin/subscriptions","organizations_url":"https://api.github.com/users/hverlin/orgs","repos_url":"https://api.github.com/users/hverlin/repos","events_url":"https://api.github.com/users/hverlin/events{/privacy}","received_events_url":"https://api.github.com/users/hverlin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hverlin/invoice-generator.js","description":"Generate invoices in node.js with the Invoice Generator API","fork":true,"url":"https://api.github.com/repos/hverlin/invoice-generator.js","forks_url":"https://api.github.com/repos/hverlin/invoice-generator.js/forks","keys_url":"https://api.github.com/repos/hverlin/invoice-generator.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hverlin/invoice-generator.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hverlin/invoice-generator.js/teams","hooks_url":"https://api.github.com/repos/hverlin/invoice-generator.js/hooks","issue_events_url":"https://api.github.com/repos/hverlin/invoice-generator.js/issues/events{/number}","events_url":"https://api.github.com/repos/hverlin/invoice-generator.js/events","assignees_url":"https://api.github.com/repos/hverlin/invoice-generator.js/assignees{/user}","branches_url":"https://api.github.com/repos/hverlin/invoice-generator.js/branches{/branch}","tags_url":"https://api.github.com/repos/hverlin/invoice-generator.js/tags","blobs_url":"https://api.github.com/repos/hverlin/invoice-generator.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hverlin/invoice-generator.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hverlin/invoice-generator.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/hverlin/invoice-generator.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hverlin/invoice-generator.js/statuses/{sha}","languages_url":"https://api.github.com/repos/hverlin/invoice-generator.js/languages","stargazers_url":"https://api.github.com/repos/hverlin/invoice-generator.js/stargazers","contributors_url":"https://api.github.com/repos/hverlin/invoice-generator.js/contributors","subscribers_url":"https://api.github.com/repos/hverlin/invoice-generator.js/subscribers","subscription_url":"https://api.github.com/repos/hverlin/invoice-generator.js/subscription","commits_url":"https://api.github.com/repos/hverlin/invoice-generator.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/hverlin/invoice-generator.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/hverlin/invoice-generator.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/hverlin/invoice-generator.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/hverlin/invoice-generator.js/contents/{+path}","compare_url":"https://api.github.com/repos/hverlin/invoice-generator.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hverlin/invoice-generator.js/merges","archive_url":"https://api.github.com/repos/hverlin/invoice-generator.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hverlin/invoice-generator.js/downloads","issues_url":"https://api.github.com/repos/hverlin/invoice-generator.js/issues{/number}","pulls_url":"https://api.github.com/repos/hverlin/invoice-generator.js/pulls{/number}","milestones_url":"https://api.github.com/repos/hverlin/invoice-generator.js/milestones{/number}","notifications_url":"https://api.github.com/repos/hverlin/invoice-generator.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hverlin/invoice-generator.js/labels{/name}","releases_url":"https://api.github.com/repos/hverlin/invoice-generator.js/releases{/id}","created_at":"2015-12-27T11:44:01Z","updated_at":"2015-12-27T11:44:02Z","pushed_at":"2015-12-27T11:48:49Z","git_url":"git://github.com/hverlin/invoice-generator.js.git","ssh_url":"git@github.com:hverlin/invoice-generator.js.git","clone_url":"https://github.com/hverlin/invoice-generator.js.git","svn_url":"https://github.com/hverlin/invoice-generator.js","homepage":"https://invoice-generator.com","size":34,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Invoiced:master","ref":"master","sha":"0b3a44462dd598c7f648ee48138a0689161b2201","user":{"login":"Invoiced","id":9790399,"avatar_url":"https://avatars.githubusercontent.com/u/9790399?v=3","gravatar_id":"","url":"https://api.github.com/users/Invoiced","html_url":"https://github.com/Invoiced","followers_url":"https://api.github.com/users/Invoiced/followers","following_url":"https://api.github.com/users/Invoiced/following{/other_user}","gists_url":"https://api.github.com/users/Invoiced/gists{/gist_id}","starred_url":"https://api.github.com/users/Invoiced/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Invoiced/subscriptions","organizations_url":"https://api.github.com/users/Invoiced/orgs","repos_url":"https://api.github.com/users/Invoiced/repos","events_url":"https://api.github.com/users/Invoiced/events{/privacy}","received_events_url":"https://api.github.com/users/Invoiced/received_events","type":"Organization","site_admin":false},"repo":{"id":44411108,"name":"invoice-generator.js","full_name":"Invoiced/invoice-generator.js","owner":{"login":"Invoiced","id":9790399,"avatar_url":"https://avatars.githubusercontent.com/u/9790399?v=3","gravatar_id":"","url":"https://api.github.com/users/Invoiced","html_url":"https://github.com/Invoiced","followers_url":"https://api.github.com/users/Invoiced/followers","following_url":"https://api.github.com/users/Invoiced/following{/other_user}","gists_url":"https://api.github.com/users/Invoiced/gists{/gist_id}","starred_url":"https://api.github.com/users/Invoiced/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Invoiced/subscriptions","organizations_url":"https://api.github.com/users/Invoiced/orgs","repos_url":"https://api.github.com/users/Invoiced/repos","events_url":"https://api.github.com/users/Invoiced/events{/privacy}","received_events_url":"https://api.github.com/users/Invoiced/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Invoiced/invoice-generator.js","description":"Generate invoices in node.js with the Invoice Generator API","fork":false,"url":"https://api.github.com/repos/Invoiced/invoice-generator.js","forks_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/forks","keys_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/teams","hooks_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/hooks","issue_events_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/issues/events{/number}","events_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/events","assignees_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/assignees{/user}","branches_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/branches{/branch}","tags_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/tags","blobs_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/statuses/{sha}","languages_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/languages","stargazers_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/stargazers","contributors_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/contributors","subscribers_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/subscribers","subscription_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/subscription","commits_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/contents/{+path}","compare_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/merges","archive_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/downloads","issues_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/issues{/number}","pulls_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/pulls{/number}","milestones_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/milestones{/number}","notifications_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/labels{/name}","releases_url":"https://api.github.com/repos/Invoiced/invoice-generator.js/releases{/id}","created_at":"2015-10-16T21:17:48Z","updated_at":"2015-10-16T21:21:13Z","pushed_at":"2015-10-19T20:47:08Z","git_url":"git://github.com/Invoiced/invoice-generator.js.git","ssh_url":"git@github.com:Invoiced/invoice-generator.js.git","clone_url":"https://github.com/Invoiced/invoice-generator.js.git","svn_url":"https://github.com/Invoiced/invoice-generator.js","homepage":"https://invoice-generator.com","size":160,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Invoiced/invoice-generator.js/pulls/1"},"html":{"href":"https://github.com/Invoiced/invoice-generator.js/pull/1"},"issue":{"href":"https://api.github.com/repos/Invoiced/invoice-generator.js/issues/1"},"comments":{"href":"https://api.github.com/repos/Invoiced/invoice-generator.js/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/Invoiced/invoice-generator.js/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/Invoiced/invoice-generator.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Invoiced/invoice-generator.js/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/Invoiced/invoice-generator.js/statuses/a645b34fd55786ad3f40dc45bd52cdc141d58978"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":2,"deletions":2,"changed_files":1}}