Closed johncblacker closed 3 years ago
According to http://bottlepy.org/docs/dev/routing.html#legacy-syntax
This works:
@route('/stream/d')
@route('/stream/<val:re:d\d*>')
# ^ notice the leading /
Yes, stream/val:re:d\d*
is does not make any sense. The old syntax would be /stream/:val#d\d*#
. The 'new' Syntax would be /stream/<val:re:d\d*>
. In any case, don't forget the leading slash.
I'm using bottle v0.12.19 on rPi and have the following routes: @route('stream/d') @route('stream/<val:re:d\d*>'
When the app starts, it sends an image with 'stream/d' as the source and I get a flash of image on the screen, then it proceeds on to a imageRefresh javascript function that extracts the first part of the http data (http://192.168.0.18:8080) and appends to it a /d and a Date.time() value. So this request would look like: "GET /stream/d1234567654321" and that results in a 404 error at the browser - which I believe means it's not matching the second route. I need some guidance on this as to whether it's something I'm doing wrong or is there a bug in the bottle code.