getQuerySnippet returns query snippet. getQuerySnippet must be called only for error reporting.
(req *http.Request)
| 67 | // |
| 68 | // getQuerySnippet must be called only for error reporting. |
| 69 | func getQuerySnippet(req *http.Request) string { |
| 70 | query := req.URL.Query().Get("query") |
| 71 | body := getQuerySnippetFromBody(req) |
| 72 | |
| 73 | if len(query) != 0 && len(body) != 0 { |
| 74 | query += "\n" |
| 75 | } |
| 76 | |
| 77 | return query + body |
| 78 | } |
| 79 | |
| 80 | func hash(s string) uint32 { |
| 81 | h := fnv.New32a() |