Expected behavior
If an HTTP client is expecting protobuf data, it should specify an appropriate mime-type in the "Accept" header, such as "application/x-google-protobuf" or "application/octet-stream". Most HTTP clients also specify "*/*" as a general fallback.
Observed behavior
OTP does not include an "Accept" Header when requesting GTFS-RT data.
Version of OTP used (exact commit hash or JAR name)
latest dev-1.x 4513d7e
Data sets in use (links to GTFS and OSM PBF files)
Bay Area MTC GTFS-RT endpoints; these will return JSON data instead of protobuf if the "Accept" header is not specified. The API does have a "format" parameter but it does not seem to allow protobuf to be explicitly specified.
Command line used to start OTP
java -jar otp.jar --server --port 8000 --graphs . --autoScan
Router config and graph build config JSON
Plain router-config with an updater that specifies one of these endpoints (exact config omitted because they require an API key).
Steps to reproduce the problem
See above.
Proposed solution
When requesting service alerts or trip updates, add "Accept: application/x-google-protobuf; application/octet-stream; */*" to the HTTP request headers.
Expected behavior
If an HTTP client is expecting protobuf data, it should specify an appropriate mime-type in the "Accept" header, such as "application/x-google-protobuf" or "application/octet-stream". Most HTTP clients also specify "*/*" as a general fallback.
Observed behavior
OTP does not include an "Accept" Header when requesting GTFS-RT data.
Version of OTP used (exact commit hash or JAR name)
latest dev-1.x 4513d7e
Data sets in use (links to GTFS and OSM PBF files)
Bay Area MTC GTFS-RT endpoints; these will return JSON data instead of protobuf if the "Accept" header is not specified. The API does have a "format" parameter but it does not seem to allow protobuf to be explicitly specified.
Command line used to start OTP
java -jar otp.jar --server --port 8000 --graphs . --autoScanRouter config and graph build config JSON
Plain router-config with an updater that specifies one of these endpoints (exact config omitted because they require an API key).
Steps to reproduce the problem
See above.
Proposed solution
When requesting service alerts or trip updates, add "Accept: application/x-google-protobuf; application/octet-stream; */*" to the HTTP request headers.