Add a patch that fixes display names for files in webdav
This commit is contained in:
parent
66d98a3a0d
commit
080e0a227e
7
PKGBUILD
7
PKGBUILD
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
pkgname=nginx-ilves
|
pkgname=nginx-ilves
|
||||||
pkgver=1.11.8
|
pkgver=1.11.8
|
||||||
pkgrel=2
|
pkgrel=3
|
||||||
pkgdesc='Lightweight HTTP server and IMAP/POP3 proxy server, mainline release'
|
pkgdesc='Lightweight HTTP server and IMAP/POP3 proxy server, mainline release'
|
||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
url='https://nginx.org'
|
url='https://nginx.org'
|
||||||
@ -30,6 +30,7 @@ source=($url/download/nginx-$pkgver.tar.gz{,.asc}
|
|||||||
service
|
service
|
||||||
logrotate
|
logrotate
|
||||||
ngx_davext.tar.gz::https://github.com/arut/nginx-dav-ext-module/archive/v0.0.3.tar.gz
|
ngx_davext.tar.gz::https://github.com/arut/nginx-dav-ext-module/archive/v0.0.3.tar.gz
|
||||||
|
fix-displayName.patch
|
||||||
ngx_fancyindex.tar.gz::https://github.com/aperezdc/ngx-fancyindex/archive/v0.4.1.tar.gz)
|
ngx_fancyindex.tar.gz::https://github.com/aperezdc/ngx-fancyindex/archive/v0.4.1.tar.gz)
|
||||||
validpgpkeys=('B0F4253373F8F6F510D42178520A9993A1C052F8') # Maxim Dounin <mdounin@mdounin.ru>
|
validpgpkeys=('B0F4253373F8F6F510D42178520A9993A1C052F8') # Maxim Dounin <mdounin@mdounin.ru>
|
||||||
md5sums=('8f68f49b6db510e567bba9e0c271a3ac'
|
md5sums=('8f68f49b6db510e567bba9e0c271a3ac'
|
||||||
@ -37,6 +38,7 @@ md5sums=('8f68f49b6db510e567bba9e0c271a3ac'
|
|||||||
'ce9a06bcaf66ec4a3c4eb59b636e0dfd'
|
'ce9a06bcaf66ec4a3c4eb59b636e0dfd'
|
||||||
'd6a6d4d819f03a675bacdfabd25aa37e'
|
'd6a6d4d819f03a675bacdfabd25aa37e'
|
||||||
'2cb502dbda335be4ebd5fed0b3182bae'
|
'2cb502dbda335be4ebd5fed0b3182bae'
|
||||||
|
'16c5dbad002ae88eadb66aa1a13389c2'
|
||||||
'e1dd79f0ec82415bbf8a1cb938988955')
|
'e1dd79f0ec82415bbf8a1cb938988955')
|
||||||
|
|
||||||
_common_flags=(
|
_common_flags=(
|
||||||
@ -73,6 +75,9 @@ _mainline_flags=(
|
|||||||
|
|
||||||
build() {
|
build() {
|
||||||
mv nginx-dav-ext-module* ngx_davext
|
mv nginx-dav-ext-module* ngx_davext
|
||||||
|
cd ngx_davext
|
||||||
|
patch -p1 -i ../../fix-displayName.patch
|
||||||
|
cd ..
|
||||||
mv ngx-fancyindex-* ngx_fancyindex
|
mv ngx-fancyindex-* ngx_fancyindex
|
||||||
|
|
||||||
cd $provides-$pkgver
|
cd $provides-$pkgver
|
||||||
|
35
fix-displayName.patch
Normal file
35
fix-displayName.patch
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
From fa4969880916bbc1634576cd9edcefe3d40e521b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mattias Wadman <mattias.wadman@gmail.com>
|
||||||
|
Date: Fri, 22 May 2015 15:43:42 +0200
|
||||||
|
Subject: [PATCH] Use path basename instead of URI basename as displayName
|
||||||
|
|
||||||
|
Display name value is a text node so it should not use be URL encoded.
|
||||||
|
Fixes issue withspace and other characters showing as %20 etc.
|
||||||
|
---
|
||||||
|
ngx_http_dav_ext_module.c | 13 +++----------
|
||||||
|
1 file changed, 3 insertions(+), 10 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/ngx_http_dav_ext_module.c b/ngx_http_dav_ext_module.c
|
||||||
|
index 73d86de..f53819c 100644
|
||||||
|
--- a/ngx_http_dav_ext_module.c
|
||||||
|
+++ b/ngx_http_dav_ext_module.c
|
||||||
|
@@ -328,16 +328,9 @@ ngx_http_dav_ext_send_propfind_atts(ngx_http_request_t *r,
|
||||||
|
"<D:displayname>"
|
||||||
|
);
|
||||||
|
|
||||||
|
- if (uri->len) {
|
||||||
|
-
|
||||||
|
- for(name.data = uri->data + uri->len;
|
||||||
|
- name.data >= uri->data + 1 && name.data[-1] != '/';
|
||||||
|
- --name.data);
|
||||||
|
-
|
||||||
|
- name.len = uri->data + uri->len - name.data;
|
||||||
|
-
|
||||||
|
- NGX_HTTP_DAV_EXT_OUTES(&name);
|
||||||
|
- }
|
||||||
|
+ name.data = strrchr(path, '/') + 1;
|
||||||
|
+ name.len = strlen(name.data);
|
||||||
|
+ NGX_HTTP_DAV_EXT_OUTES(&name);
|
||||||
|
|
||||||
|
NGX_HTTP_DAV_EXT_OUTL(
|
||||||
|
"</D:displayname>\n"
|
Loading…
Reference in New Issue
Block a user