(cr *collectionReq, vars map[string]string, w http.ResponseWriter, r *http.Request)
| 706 | } |
| 707 | |
| 708 | func processCollectionRequest(cr *collectionReq, vars map[string]string, w http.ResponseWriter, r *http.Request) error { |
| 709 | cr.prefix = vars["prefix"] |
| 710 | cr.alias = vars["collection"] |
| 711 | // Normalize the URL, redirecting user to consistent post URL |
| 712 | if cr.alias != strings.ToLower(cr.alias) { |
| 713 | return impart.HTTPError{http.StatusMovedPermanently, fmt.Sprintf("/%s/", strings.ToLower(cr.alias))} |
| 714 | } |
| 715 | |
| 716 | return nil |
| 717 | } |
| 718 | |
| 719 | // processCollectionPermissions checks the permissions for the given |
| 720 | // collectionReq, returning a Collection if access is granted; otherwise this |
no outgoing calls
no test coverage detected