{"action":"opened","issue":{"url":"https://api.github.com/repos/embedthis/goahead/issues/191","labels_url":"https://api.github.com/repos/embedthis/goahead/issues/191/labels{/name}","comments_url":"https://api.github.com/repos/embedthis/goahead/issues/191/comments","events_url":"https://api.github.com/repos/embedthis/goahead/issues/191/events","html_url":"https://github.com/embedthis/goahead/issues/191","id":116273266,"number":191,"title":"Request causes CPU hog","user":{"login":"embedthis","id":168175,"avatar_url":"https://avatars.githubusercontent.com/u/168175?v=3","gravatar_id":"","url":"https://api.github.com/users/embedthis","html_url":"https://github.com/embedthis","followers_url":"https://api.github.com/users/embedthis/followers","following_url":"https://api.github.com/users/embedthis/following{/other_user}","gists_url":"https://api.github.com/users/embedthis/gists{/gist_id}","starred_url":"https://api.github.com/users/embedthis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embedthis/subscriptions","organizations_url":"https://api.github.com/users/embedthis/orgs","repos_url":"https://api.github.com/users/embedthis/repos","events_url":"https://api.github.com/users/embedthis/events{/privacy}","received_events_url":"https://api.github.com/users/embedthis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/embedthis/goahead/labels/bug","name":"bug","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/embedthis/goahead/milestones/31","html_url":"https://github.com/embedthis/goahead/milestones/3.5.1","labels_url":"https://api.github.com/repos/embedthis/goahead/milestones/31/labels","id":1320597,"number":31,"title":"3.5.1","description":"","creator":{"login":"embedthis","id":168175,"avatar_url":"https://avatars.githubusercontent.com/u/168175?v=3","gravatar_id":"","url":"https://api.github.com/users/embedthis","html_url":"https://github.com/embedthis","followers_url":"https://api.github.com/users/embedthis/followers","following_url":"https://api.github.com/users/embedthis/following{/other_user}","gists_url":"https://api.github.com/users/embedthis/gists{/gist_id}","starred_url":"https://api.github.com/users/embedthis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embedthis/subscriptions","organizations_url":"https://api.github.com/users/embedthis/orgs","repos_url":"https://api.github.com/users/embedthis/repos","events_url":"https://api.github.com/users/embedthis/events{/privacy}","received_events_url":"https://api.github.com/users/embedthis/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":15,"state":"open","created_at":"2015-09-23T15:45:03Z","updated_at":"2015-11-11T06:12:54Z","due_on":"2015-11-14T08:00:00Z","closed_at":null},"comments":0,"created_at":"2015-11-11T06:12:54Z","updated_at":"2015-11-11T06:12:54Z","closed_at":null,"body":"A specially crafted request can cause a CPU hog. This happens when a request is full of \"\\n\".\r\n\r\n```\r\ndiff --git a/src/http/httpLib.c b/src/http/httpLib.c\r\nindex 8370b75..231327d 100644\r\n--- a/src/http/httpLib.c\r\n+++ b/src/http/httpLib.c\r\n@@ -16259,7 +16259,9 @@ static bool parseIncoming(HttpConn *conn)\r\n     }\r\n     start = mprGetBufStart(packet->content);\r\n     while (*start == '\\r' || *start == '\\n') {\r\n-        mprGetCharFromBuf(packet->content);\r\n+        if (mprGetCharFromBuf(packet->content) < 0) {\r\n+            break;\r\n+        }\r\n         start = mprGetBufStart(packet->content);\r\n```"}}