zotero/translation-server — pull request #8 by mvolz (2014-07-04 18:29:34+00:00)
Title: Fix for internal 501 errors due to invalid URLs

Invalid URLs were causing 501 errors instead
of 400 errors. This was because schemeIs()
was getting called on non-nsiURI objects since
Services.io.newURI was failing silently (was
wrapped inside a try block.) To replicate, query
using a 'URL' with no protocol specified (i.e.
'github.com')

Changes:
Moved 'Invalid URL specified' into catch block
when trying to create a Services.io.newURI

Gives separate message for when protocol is
neither http nor https (still returns 400)