mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-06 07:33:01 +02:00
uboot: Add leading slash to path when using HTTP
RFC 7230, section 5.3.1 specifies that the path must start with a slash. ...and nginx is not amused by its absence.
This commit is contained in:
@@ -4,9 +4,12 @@ if test -n "${ipaddr}" -a -n "${netmask}" -a -n "${serverip}" -a -n "${bootfile}
|
||||
setenv proto tftp
|
||||
setenv dltool tftpboot
|
||||
|
||||
if setexpr proto sub "^(http|tftp)://.*" "\\1" "${bootfile}" && setexpr bootfile sub "^(http|tftp)://([^/]+?)/(.*)" "\2:\3"; then
|
||||
if setexpr proto sub "^(http|tftp)://.*" "\\1" "${bootfile}"; then
|
||||
if test "${proto}" = "http"; then
|
||||
setenv dltool wget
|
||||
setexpr bootfile sub "^http://([^/]+?)/(.*)" "\1:/\2"
|
||||
else
|
||||
setexpr bootfile sub "^tftp://([^/]+?)/(.*)" "\1:\2"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user