Skip to content

v0.1.17 — EFA: accept RapidJSON sent with an XML content type

Choose a tag to compare

@NerdySoftPaw NerdySoftPaw released this 08 Aug 17:44
48f5b01

Fixed

  • EFA: accept RapidJSON payloads sent with an XML content type. VGN (Nuremberg) answers outputFormat=RapidJSON requests with Content-Type: text/xml;;charset=utf-8. aiohttp's strict content-type check rejected those bodies, so station search failed with "no results found" and departures never loaded. Both EFA request paths (fetch_departures, search_stops) now decode with content_type=None; malformed bodies still fall through to the existing error handling. Applies to all 16 EFA providers.

    Fixes openpublictransport#79

Tests

New tests/test_efa_mimetype.py — the fake response mimics aiohttp and raises unless the strict check is disabled, so it fails without the fix.