Page MenuHomePhabricator

mw.uri.new throws error on URL with empty query string or fragment
Closed, ResolvedPublic

Description

Author: mmantel

Description:
mw.uri.new throws an error if the URL passed to it ends with a question mark (i.e. an empty query string) or a pound sign (i.e. an empty fragment)

mw.uri.new('http://www.example.com/foo?') ==> Lua error in mw.uri.lua at line 131: invalid .path.

mw.uri.new('http://www.example.com/foo#') ==> Lua error in mw.uri.lua at line 131: invalid .path.

These are valid URL's and should be parsed successfully.


Version: unspecified
Severity: normal

Details

Reference
bz45655