Merge branch 'feature/case-insensitive-path'

This commit is contained in:
Valentin Brandl 2019-04-30 16:45:43 +02:00
commit 8ae71cdb5d
No known key found for this signature in database
GPG Key ID: 30D341DD34118D7D

View File

@ -204,7 +204,7 @@ fn hoc_request<T: Service>(
state: web::Data<Arc<State>>, state: web::Data<Arc<State>>,
data: web::Path<(String, String)>, data: web::Path<(String, String)>,
) -> Result<HocResult, Error> { ) -> Result<HocResult, Error> {
let repo = format!("{}/{}", data.0, data.1); let repo = format!("{}/{}", data.0.to_lowercase(), data.1.to_lowercase());
let service_path = format!("{}/{}", T::domain(), repo); let service_path = format!("{}/{}", T::domain(), repo);
let path = format!("{}/{}", state.repos, service_path); let path = format!("{}/{}", state.repos, service_path);
let file = Path::new(&path); let file = Path::new(&path);