{"action":"created","comment":{"url":"https://api.github.com/repos/mholt/caddy/pulls/comments/42152495","id":42152495,"diff_hunk":"@@ -0,0 +1,413 @@\n+package middleware\n+\n+import (\n+\t\"bytes\"\n+\t\"fmt\"\n+\t\"io/ioutil\"\n+\t\"net/http\"\n+\t\"net/url\"\n+\t\"os\"\n+\t\"path/filepath\"\n+\t\"strings\"\n+\t\"testing\"\n+\t\"time\"\n+)\n+\n+func TestInclude(t *testing.T) {\n+\tcontext := getContextOrFail(t)\n+\n+\tinputFilename := \"test_file\"\n+\tabsInFilePath := filepath.Join(fmt.Sprintf(\"%s\", context.Root), inputFilename)\n+\tdefer func() {\n+\t\terr := os.Remove(absInFilePath)\n+\t\tif err != nil && !os.IsNotExist(err) {\n+\t\t\tt.Fatalf(\"Failed to clean test file!\")\n+\t\t}\n+\t}()\n+\n+\ttests := []struct {\n+\t\tfileContent          string\n+\t\texpectedContent      string\n+\t\tshouldErr            bool\n+\t\texpectedErrorContent string\n+\t}{\n+\t\t// Test 0 - all good\n+\t\t{\n+\t\t\tfileContent:          `str1 {{ .Root }} str2`,\n+\t\t\texpectedContent:      fmt.Sprintf(\"str1 %s str2\", context.Root),\n+\t\t\tshouldErr:            false,\n+\t\t\texpectedErrorContent: \"\",\n+\t\t},\n+\t\t// Test 1 - failure on template.Parse\n+\t\t{\n+\t\t\tfileContent:          `str1 {{ .Root } str2`,\n+\t\t\texpectedContent:      \"\",\n+\t\t\tshouldErr:            true,\n+\t\t\texpectedErrorContent: `unexpected \"}\" in operand`,\n+\t\t},\n+\t\t// Test 3 - failure on template.Execute\n+\t\t{\n+\t\t\tfileContent:          `str1 {{ .InvalidField }} str2`,\n+\t\t\texpectedContent:      \"\",\n+\t\t\tshouldErr:            true,\n+\t\t\texpectedErrorContent: `InvalidField is not a field of struct type middleware.Context`,\n+\t\t},\n+\t}\n+\n+\tfor i, test := range tests {\n+\t\ttestPrefix := getTestPrefix(i)\n+\n+\t\t// WriteFile truncates the contentt\n+\t\terr := ioutil.WriteFile(absInFilePath, []byte(test.fileContent), os.ModePerm)\n+\t\tif err != nil {\n+\t\t\tt.Fatal(testPrefix+\"Failed to create test file. Error was: %v\", err)\n+\t\t}\n+\n+\t\tcontent, err := context.Include(inputFilename)\n+\t\tif err != nil {\n+\t\t\tif !test.shouldErr {\n+\t\t\t\tt.Errorf(testPrefix+\"Expected no error, found [%s]\", test.expectedErrorContent, err.Error())\n+\t\t\t}\n+\t\t\tif !strings.Contains(err.Error(), test.expectedErrorContent) {\n+\t\t\t\tt.Errorf(testPrefix+\"Expected error content [%s], found [%s]\", test.expectedErrorContent, err.Error())\n+\t\t\t}\n+\t\t}\n+\n+\t\tif err == nil && test.shouldErr {\n+\t\t\tt.Errorf(testPrefix+\"Expected error [%s] but found nil. Input file was: %s\", test.expectedErrorContent, inputFilename)\n+\t\t}\n+\n+\t\tif content != test.expectedContent {\n+\t\t\tt.Errorf(testPrefix+\"Expected content [%s] but found [%s]. Input file was: %s\", test.expectedContent, content, inputFilename)\n+\t\t}\n+\t}\n+}\n+\n+func TestIncludeNotExisting(t *testing.T) {\n+\tcontext := getContextOrFail(t)\n+\n+\t_, err := context.Include(\"not_existing\")\n+\tif err == nil {\n+\t\tt.Errorf(\"Expected error but found nil!\")\n+\t}\n+}\n+\n+func TestCookie(t *testing.T) {\n+\n+\ttests := []struct {\n+\t\tcookie        *http.Cookie\n+\t\tcookieName    string\n+\t\texpectedValue string\n+\t}{\n+\t\t// Test 0 - happy path\n+\t\t{\n+\t\t\tcookie:        &http.Cookie{Name: \"cookieName\", Value: \"cookieValue\"},\n+\t\t\tcookieName:    \"cookieName\",\n+\t\t\texpectedValue: \"cookieValue\",\n+\t\t},\n+\t\t// Test 1 - try to get a non-existing cookie\n+\t\t{\n+\t\t\tcookie:        &http.Cookie{Name: \"cookieName\", Value: \"cookieValue\"},\n+\t\t\tcookieName:    \"notExisting\",\n+\t\t\texpectedValue: \"\",\n+\t\t},\n+\t\t// Test 2 - partial name match\n+\t\t{\n+\t\t\tcookie:        &http.Cookie{Name: \"cookie\", Value: \"cookieValue\"},\n+\t\t\tcookieName:    \"cook\",\n+\t\t\texpectedValue: \"\",\n+\t\t},\n+\t\t// Test 3 - cookie with optional fields\n+\t\t{\n+\t\t\tcookie:        &http.Cookie{Name: \"cookie\", Value: \"cookieValue\", Path: \"/path\", Domain: \"https://caddy.com\", Expires: (time.Now().Add(10 * time.Minute)), MaxAge: 120},\n+\t\t\tcookieName:    \"cookie\",\n+\t\t\texpectedValue: \"cookieValue\",\n+\t\t},\n+\t}\n+\n+\tfor i, test := range tests {\n+\t\ttestPrefix := getTestPrefix(i)\n+\n+\t\t// reinitialize the context for each test\n+\t\tcontext := getContextOrFail(t)\n+\n+\t\tcontext.Req.AddCookie(test.cookie)\n+\n+\t\tactualCookieVal := context.Cookie(test.cookieName)\n+\n+\t\tif actualCookieVal != test.expectedValue {\n+\t\t\tt.Errorf(testPrefix+\"Expected cookie value [%s] but found [%s] for cookie with name %s\", test.expectedValue, actualCookieVal, test.cookieName)\n+\t\t}\n+\t}\n+}\n+\n+func TestCookieMultipleCookies(t *testing.T) {\n+\tcontext := getContextOrFail(t)\n+\n+\tcookieNameBase, cookieValueBase := \"cookieName\", \"cookieValue\"\n+\n+\t// make sure that there's no state and multiple requests for different cookies return the correct result\n+\tfor i := 0; i < 10; i++ {\n+\t\tcontext.Req.AddCookie(&http.Cookie{Name: fmt.Sprintf(\"%s%d\", cookieNameBase, i), Value: fmt.Sprintf(\"%s%d\", cookieValueBase, i)})\n+\t}\n+\n+\tfor i := 0; i < 10; i++ {\n+\t\texpectedCookieVal := fmt.Sprintf(\"%s%d\", cookieValueBase, i)\n+\t\tactualCookieVal := context.Cookie(fmt.Sprintf(\"%s%d\", cookieNameBase, i))\n+\t\tif actualCookieVal != expectedCookieVal {\n+\t\t\tt.Fatalf(\"Expected cookie value %s, found %s\", expectedCookieVal, actualCookieVal)\n+\t\t}\n+\t}\n+}\n+\n+func TestHeader(t *testing.T) {\n+\tcontext := getContextOrFail(t)\n+\n+\theaderKey, headerVal := \"Header1\", \"HeaderVal1\"\n+\tcontext.Req.Header.Add(headerKey, headerVal)\n+\n+\tactualHeaderVal := context.Header(headerKey)\n+\tif actualHeaderVal != headerVal {\n+\t\tt.Errorf(\"Expected header %s, found %s\", headerVal, actualHeaderVal)\n+\t}\n+\n+\tmissingHeaderVal := context.Header(\"not-existing\")\n+\tif missingHeaderVal != \"\" {\n+\t\tt.Errorf(\"Expected empty header value, found %s\", missingHeaderVal)\n+\t}\n+}\n+\n+func TestIP(t *testing.T) {\n+\tcontext := getContextOrFail(t)\n+\n+\ttests := []struct {\n+\t\tinputRemoteAddr string\n+\t\texpectedIP      string\n+\t}{\n+\t\t// Test 0 - ipv4 with port\n+\t\t{\"1.1.1.1:1111\", \"1.1.1.1\"},\n+\t\t// Test 1 - ipv4 without port\n+\t\t{\"1.1.1.1\", \"1.1.1.1\"},\n+\t\t// Test 2 - ipv6 with port\n+\t\t{\"[::1]:11\", \"::1\"},\n+\t\t// Test 3 - ipv6 without port and brackets\n+\t\t{\"[2001:db8:a0b:12f0::1]\", \"[2001:db8:a0b:12f0::1]\"},\n+\t\t// Test 4 - ipv6 with zone and port\n+\t\t{`[fe80:1::3%eth0]:44`, `fe80:1::3%eth0`},\n+\t\t// Test 5 - ipv6 without port with brackets\n+\t\t// {\"[:fe:2]\", \":fe:2\"}, // TODO - failing (error in SplitHostPort) returns the host with brackets\n+\t\t// Test 6 - invalid address\n+\t\t// {\":::::::::::::\", \"\"}, // TODO - failing (error in SplitHostPort) returns the invalid address\n+\t\t// Test 7 - invalid address\n+\t\t// {\"[::1][]\", \"\"}, // TODO - failing (error in SplitHostPort) returns the invalid address","path":"middleware/context_test.go","position":202,"original_position":202,"commit_id":"bd4d9c6fe26c78eeef993e9d7adc1cd5c3fa7b2c","original_commit_id":"bd4d9c6fe26c78eeef993e9d7adc1cd5c3fa7b2c","user":{"login":"mholt","id":1128849,"avatar_url":"https://avatars.githubusercontent.com/u/1128849?v=3","gravatar_id":"","url":"https://api.github.com/users/mholt","html_url":"https://github.com/mholt","followers_url":"https://api.github.com/users/mholt/followers","following_url":"https://api.github.com/users/mholt/following{/other_user}","gists_url":"https://api.github.com/users/mholt/gists{/gist_id}","starred_url":"https://api.github.com/users/mholt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mholt/subscriptions","organizations_url":"https://api.github.com/users/mholt/orgs","repos_url":"https://api.github.com/users/mholt/repos","events_url":"https://api.github.com/users/mholt/events{/privacy}","received_events_url":"https://api.github.com/users/mholt/received_events","type":"User","site_admin":false},"body":"These commented test cases -- they are obviously invalid IPv6 syntax; any reason why are they are commented out? It should just return the input in the case of a parse error.","created_at":"2015-10-15T17:16:07Z","updated_at":"2015-10-15T17:16:07Z","html_url":"https://github.com/mholt/caddy/pull/274#discussion_r42152495","pull_request_url":"https://api.github.com/repos/mholt/caddy/pulls/274","_links":{"self":{"href":"https://api.github.com/repos/mholt/caddy/pulls/comments/42152495"},"html":{"href":"https://github.com/mholt/caddy/pull/274#discussion_r42152495"},"pull_request":{"href":"https://api.github.com/repos/mholt/caddy/pulls/274"}}},"pull_request":{"url":"https://api.github.com/repos/mholt/caddy/pulls/274","id":47812686,"html_url":"https://github.com/mholt/caddy/pull/274","diff_url":"https://github.com/mholt/caddy/pull/274.diff","patch_url":"https://github.com/mholt/caddy/pull/274.patch","issue_url":"https://api.github.com/repos/mholt/caddy/issues/274","number":274,"state":"open","locked":false,"title":"Add context.go tests","user":{"login":"Makpoc","id":4800691,"avatar_url":"https://avatars.githubusercontent.com/u/4800691?v=3","gravatar_id":"","url":"https://api.github.com/users/Makpoc","html_url":"https://github.com/Makpoc","followers_url":"https://api.github.com/users/Makpoc/followers","following_url":"https://api.github.com/users/Makpoc/following{/other_user}","gists_url":"https://api.github.com/users/Makpoc/gists{/gist_id}","starred_url":"https://api.github.com/users/Makpoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Makpoc/subscriptions","organizations_url":"https://api.github.com/users/Makpoc/orgs","repos_url":"https://api.github.com/users/Makpoc/repos","events_url":"https://api.github.com/users/Makpoc/events{/privacy}","received_events_url":"https://api.github.com/users/Makpoc/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-15T16:52:24Z","updated_at":"2015-10-15T17:16:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"79e6b1dc0c3ef9d224f8c5f98a364c01ed10f60f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mholt/caddy/pulls/274/commits","review_comments_url":"https://api.github.com/repos/mholt/caddy/pulls/274/comments","review_comment_url":"https://api.github.com/repos/mholt/caddy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mholt/caddy/issues/274/comments","statuses_url":"https://api.github.com/repos/mholt/caddy/statuses/bd4d9c6fe26c78eeef993e9d7adc1cd5c3fa7b2c","head":{"label":"Makpoc:context_tests","ref":"context_tests","sha":"bd4d9c6fe26c78eeef993e9d7adc1cd5c3fa7b2c","user":{"login":"Makpoc","id":4800691,"avatar_url":"https://avatars.githubusercontent.com/u/4800691?v=3","gravatar_id":"","url":"https://api.github.com/users/Makpoc","html_url":"https://github.com/Makpoc","followers_url":"https://api.github.com/users/Makpoc/followers","following_url":"https://api.github.com/users/Makpoc/following{/other_user}","gists_url":"https://api.github.com/users/Makpoc/gists{/gist_id}","starred_url":"https://api.github.com/users/Makpoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Makpoc/subscriptions","organizations_url":"https://api.github.com/users/Makpoc/orgs","repos_url":"https://api.github.com/users/Makpoc/repos","events_url":"https://api.github.com/users/Makpoc/events{/privacy}","received_events_url":"https://api.github.com/users/Makpoc/received_events","type":"User","site_admin":false},"repo":{"id":43963628,"name":"caddy","full_name":"Makpoc/caddy","owner":{"login":"Makpoc","id":4800691,"avatar_url":"https://avatars.githubusercontent.com/u/4800691?v=3","gravatar_id":"","url":"https://api.github.com/users/Makpoc","html_url":"https://github.com/Makpoc","followers_url":"https://api.github.com/users/Makpoc/followers","following_url":"https://api.github.com/users/Makpoc/following{/other_user}","gists_url":"https://api.github.com/users/Makpoc/gists{/gist_id}","starred_url":"https://api.github.com/users/Makpoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Makpoc/subscriptions","organizations_url":"https://api.github.com/users/Makpoc/orgs","repos_url":"https://api.github.com/users/Makpoc/repos","events_url":"https://api.github.com/users/Makpoc/events{/privacy}","received_events_url":"https://api.github.com/users/Makpoc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Makpoc/caddy","description":"Fast general-purpose HTTP/2 web server for any platform.","fork":true,"url":"https://api.github.com/repos/Makpoc/caddy","forks_url":"https://api.github.com/repos/Makpoc/caddy/forks","keys_url":"https://api.github.com/repos/Makpoc/caddy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Makpoc/caddy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Makpoc/caddy/teams","hooks_url":"https://api.github.com/repos/Makpoc/caddy/hooks","issue_events_url":"https://api.github.com/repos/Makpoc/caddy/issues/events{/number}","events_url":"https://api.github.com/repos/Makpoc/caddy/events","assignees_url":"https://api.github.com/repos/Makpoc/caddy/assignees{/user}","branches_url":"https://api.github.com/repos/Makpoc/caddy/branches{/branch}","tags_url":"https://api.github.com/repos/Makpoc/caddy/tags","blobs_url":"https://api.github.com/repos/Makpoc/caddy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Makpoc/caddy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Makpoc/caddy/git/refs{/sha}","trees_url":"https://api.github.com/repos/Makpoc/caddy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Makpoc/caddy/statuses/{sha}","languages_url":"https://api.github.com/repos/Makpoc/caddy/languages","stargazers_url":"https://api.github.com/repos/Makpoc/caddy/stargazers","contributors_url":"https://api.github.com/repos/Makpoc/caddy/contributors","subscribers_url":"https://api.github.com/repos/Makpoc/caddy/subscribers","subscription_url":"https://api.github.com/repos/Makpoc/caddy/subscription","commits_url":"https://api.github.com/repos/Makpoc/caddy/commits{/sha}","git_commits_url":"https://api.github.com/repos/Makpoc/caddy/git/commits{/sha}","comments_url":"https://api.github.com/repos/Makpoc/caddy/comments{/number}","issue_comment_url":"https://api.github.com/repos/Makpoc/caddy/issues/comments{/number}","contents_url":"https://api.github.com/repos/Makpoc/caddy/contents/{+path}","compare_url":"https://api.github.com/repos/Makpoc/caddy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Makpoc/caddy/merges","archive_url":"https://api.github.com/repos/Makpoc/caddy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Makpoc/caddy/downloads","issues_url":"https://api.github.com/repos/Makpoc/caddy/issues{/number}","pulls_url":"https://api.github.com/repos/Makpoc/caddy/pulls{/number}","milestones_url":"https://api.github.com/repos/Makpoc/caddy/milestones{/number}","notifications_url":"https://api.github.com/repos/Makpoc/caddy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Makpoc/caddy/labels{/name}","releases_url":"https://api.github.com/repos/Makpoc/caddy/releases{/id}","created_at":"2015-10-09T15:18:34Z","updated_at":"2015-10-09T15:18:35Z","pushed_at":"2015-10-15T16:46:37Z","git_url":"git://github.com/Makpoc/caddy.git","ssh_url":"git@github.com:Makpoc/caddy.git","clone_url":"https://github.com/Makpoc/caddy.git","svn_url":"https://github.com/Makpoc/caddy","homepage":"https://caddyserver.com","size":916,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"mholt:master","ref":"master","sha":"a48ed9a246331a0c426b73e0968f0ef4406e9afb","user":{"login":"mholt","id":1128849,"avatar_url":"https://avatars.githubusercontent.com/u/1128849?v=3","gravatar_id":"","url":"https://api.github.com/users/mholt","html_url":"https://github.com/mholt","followers_url":"https://api.github.com/users/mholt/followers","following_url":"https://api.github.com/users/mholt/following{/other_user}","gists_url":"https://api.github.com/users/mholt/gists{/gist_id}","starred_url":"https://api.github.com/users/mholt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mholt/subscriptions","organizations_url":"https://api.github.com/users/mholt/orgs","repos_url":"https://api.github.com/users/mholt/repos","events_url":"https://api.github.com/users/mholt/events{/privacy}","received_events_url":"https://api.github.com/users/mholt/received_events","type":"User","site_admin":false},"repo":{"id":29207621,"name":"caddy","full_name":"mholt/caddy","owner":{"login":"mholt","id":1128849,"avatar_url":"https://avatars.githubusercontent.com/u/1128849?v=3","gravatar_id":"","url":"https://api.github.com/users/mholt","html_url":"https://github.com/mholt","followers_url":"https://api.github.com/users/mholt/followers","following_url":"https://api.github.com/users/mholt/following{/other_user}","gists_url":"https://api.github.com/users/mholt/gists{/gist_id}","starred_url":"https://api.github.com/users/mholt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mholt/subscriptions","organizations_url":"https://api.github.com/users/mholt/orgs","repos_url":"https://api.github.com/users/mholt/repos","events_url":"https://api.github.com/users/mholt/events{/privacy}","received_events_url":"https://api.github.com/users/mholt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mholt/caddy","description":"Fast general-purpose HTTP/2 web server for any platform.","fork":false,"url":"https://api.github.com/repos/mholt/caddy","forks_url":"https://api.github.com/repos/mholt/caddy/forks","keys_url":"https://api.github.com/repos/mholt/caddy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mholt/caddy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mholt/caddy/teams","hooks_url":"https://api.github.com/repos/mholt/caddy/hooks","issue_events_url":"https://api.github.com/repos/mholt/caddy/issues/events{/number}","events_url":"https://api.github.com/repos/mholt/caddy/events","assignees_url":"https://api.github.com/repos/mholt/caddy/assignees{/user}","branches_url":"https://api.github.com/repos/mholt/caddy/branches{/branch}","tags_url":"https://api.github.com/repos/mholt/caddy/tags","blobs_url":"https://api.github.com/repos/mholt/caddy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mholt/caddy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mholt/caddy/git/refs{/sha}","trees_url":"https://api.github.com/repos/mholt/caddy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mholt/caddy/statuses/{sha}","languages_url":"https://api.github.com/repos/mholt/caddy/languages","stargazers_url":"https://api.github.com/repos/mholt/caddy/stargazers","contributors_url":"https://api.github.com/repos/mholt/caddy/contributors","subscribers_url":"https://api.github.com/repos/mholt/caddy/subscribers","subscription_url":"https://api.github.com/repos/mholt/caddy/subscription","commits_url":"https://api.github.com/repos/mholt/caddy/commits{/sha}","git_commits_url":"https://api.github.com/repos/mholt/caddy/git/commits{/sha}","comments_url":"https://api.github.com/repos/mholt/caddy/comments{/number}","issue_comment_url":"https://api.github.com/repos/mholt/caddy/issues/comments{/number}","contents_url":"https://api.github.com/repos/mholt/caddy/contents/{+path}","compare_url":"https://api.github.com/repos/mholt/caddy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mholt/caddy/merges","archive_url":"https://api.github.com/repos/mholt/caddy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mholt/caddy/downloads","issues_url":"https://api.github.com/repos/mholt/caddy/issues{/number}","pulls_url":"https://api.github.com/repos/mholt/caddy/pulls{/number}","milestones_url":"https://api.github.com/repos/mholt/caddy/milestones{/number}","notifications_url":"https://api.github.com/repos/mholt/caddy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mholt/caddy/labels{/name}","releases_url":"https://api.github.com/repos/mholt/caddy/releases{/id}","created_at":"2015-01-13T19:45:03Z","updated_at":"2015-10-15T12:52:19Z","pushed_at":"2015-10-15T16:52:25Z","git_url":"git://github.com/mholt/caddy.git","ssh_url":"git@github.com:mholt/caddy.git","clone_url":"https://github.com/mholt/caddy.git","svn_url":"https://github.com/mholt/caddy","homepage":"https://caddyserver.com","size":2491,"stargazers_count":2321,"watchers_count":2321,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":161,"mirror_url":null,"open_issues_count":40,"forks":161,"open_issues":40,"watchers":2321,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mholt/caddy/pulls/274"},"html":{"href":"https://github.com/mholt/caddy/pull/274"},"issue":{"href":"https://api.github.com/repos/mholt/caddy/issues/274"},"comments":{"href":"https://api.github.com/repos/mholt/caddy/issues/274/comments"},"review_comments":{"href":"https://api.github.com/repos/mholt/caddy/pulls/274/comments"},"review_comment":{"href":"https://api.github.com/repos/mholt/caddy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mholt/caddy/pulls/274/commits"},"statuses":{"href":"https://api.github.com/repos/mholt/caddy/statuses/bd4d9c6fe26c78eeef993e9d7adc1cd5c3fa7b2c"}}}}