mutalyzer / mutalyzer2

HGVS variant nomenclature checker
https://mutalyzer.nl
Other
98 stars 23 forks source link

"This is not an LRG record." error #494

Closed codeunsolved closed 4 years ago

codeunsolved commented 4 years ago

I had deployed Mutalyzer(v2.0.31, v2.0.32) on my server recently. And it raises "This is not an LRG record." error when access URL like: {host}/name-checker?description=LRG_24t1%3Ac.159dup.

After digging out, ::LRGRetriever:: assumes Content-type of a valid LRG file response should be 'application/xml':

# Retriever.py line814
if (info['Content-Type'] == 'application/xml' and
        'Content-length' in info):
    # Looks like a valid LRG file.

But I got one more content-type: 'text/xml' in my environment. So I made some modification like below:

if (info['Content-Type'] in ['application/xml', 'text/xml'] and
        'Content-length' in info):
    # Looks like a valid LRG file.

Please see related pull requests.