1
0
mirror of https://github.com/sjlongland/tornado-gallery.git synced 2025-09-13 08:42:23 +10:00

server: Support photo.html pseudo-page

Certain phone browsers (ahhem, ZTE!) ignore the `Content-Type` header
and try to parse the URI to figure out what kind of page they're getting
sent, and will choke if given a HTML file when the URI ends in `.jpg`.
This commit is contained in:
Stuart Longland 2018-04-18 17:54:58 +10:00
parent 8372935fe1
commit 43661fb8ba
Signed by: stuartl
GPG Key ID: 6AA32EFB18079BAA

View File

@ -229,7 +229,7 @@ class GalleryApp(Application):
PhotoHandler),
(r"/([a-zA-Z0-9_\-]+)/([a-zA-Z0-9_\-]+\.[a-zA-Z]+)/thumb.jpg",
ThumbnailHandler),
(r"/([a-zA-Z0-9_\-]+)/([a-zA-Z0-9_\-]+\.[a-zA-Z]+)(?:\.html)?",
(r"/([a-zA-Z0-9_\-]+)/([a-zA-Z0-9_\-]+\.[a-zA-Z]+)(?:/?[a-z]*\.html)?",
PhotoPageHandler),
(r"/([a-zA-Z0-9_\-]+)/?", GalleryHandler),
(r"/", RootHandler),