mirror of
https://github.com/openwrt/luci.git
synced 2025-07-04 17:53:11 +00:00
When users add an extraneous slash to the server url, then the ASU server redirects GET requests. But, this causes an error on POST requests as the ASU server does not redirect those, so the LuCI client failed inappropriately with an unhandled error. Fix both of these by first trimming trailing slashes from the server url as it is loaded to avoid the redirects. Then, also handle all unexpected responses, instead of just a select few. Links: efahl/owut@724c990d6c Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>