Skip to content

HTTP: No 404 for /data/* paths #1537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
cweiske opened this issue Apr 27, 2025 · 0 comments
Open

HTTP: No 404 for /data/* paths #1537

cweiske opened this issue Apr 27, 2025 · 0 comments

Comments

@cweiske
Copy link

cweiske commented Apr 27, 2025

Description

ebusd always returns a "200 OK" status when a path starting with /data/ is requested, e.g. http://heizr-va/data/foo/bar/baz.

Actual behavior

$ curl -i http://heizr-va/data/foo/bar/baz
HTTP/1.0 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: 358
Server: ebusd/25.1

{
 "global": {
  "version": "25.1.25.1",
  "updatecheck": "OK, device firmware v5 1[540f] up to date",
  "signal": true,
  "symbolrate": 24,
  "maxsymbolrate": 140,
  "minarbitrationmicros": 5,
  "maxarbitrationmicros": 12,
  "minsymbollatency": 4,
  "maxsymbollatency": 4,
  "qq": 49,
  "reconnects": 0,
  "masters": 4,
  "messages": 702,
  "lastup": 0
 }
}

Expected behavior

A 404 should be returned when the path does not match an existing circuit or name.

See https://github.com/john30/ebusd/wiki/3.2.-HTTP-client#introduction

The data URL path understood thus "/data[/[circuit][/[name]]]" where parts in brackets are optional.

ebusd version

25.1

ebusd arguments

--scanconfig --device=ens:/dev/ttyAMA0 --latency=50 --logfile=/var/log/ebusd.log --loglevel=info --httpport=80 --htmlpath=/usr/local/src/ebusd/contrib/html/

Operating system

Debian 12 (Bookworm) / Ubuntu 22-23 / Raspberry Pi OS 12 (including lite)

CPU architecture

armv7l

Dockerized

None

Hardware interface

Adapter Shield v5 via Raspberry GPIO

Related integration

HTTP

Logs

2025-04-27 18:49:19.970 [network info] [00115] HTTP connection opened 192.168.3.5
2025-04-27 18:49:19.972 [network info] [00115] connection closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant