mirror of
https://github.com/sjlongland/tornado-gallery.git
synced 2025-09-21 05:38:28 +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:
parent
8372935fe1
commit
43661fb8ba
@ -229,7 +229,7 @@ class GalleryApp(Application):
|
|||||||
PhotoHandler),
|
PhotoHandler),
|
||||||
(r"/([a-zA-Z0-9_\-]+)/([a-zA-Z0-9_\-]+\.[a-zA-Z]+)/thumb.jpg",
|
(r"/([a-zA-Z0-9_\-]+)/([a-zA-Z0-9_\-]+\.[a-zA-Z]+)/thumb.jpg",
|
||||||
ThumbnailHandler),
|
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),
|
PhotoPageHandler),
|
||||||
(r"/([a-zA-Z0-9_\-]+)/?", GalleryHandler),
|
(r"/([a-zA-Z0-9_\-]+)/?", GalleryHandler),
|
||||||
(r"/", RootHandler),
|
(r"/", RootHandler),
|
||||||
|
Loading…
Reference in New Issue
Block a user