ptpb / pb

pb is a formerly-lightweight pastebin and url shortener
Other
549 stars 52 forks source link

/l and /ls do not respect Accept: application/json #138

Closed HalosGhost closed 8 years ago

HalosGhost commented 8 years ago
$ curl -H 'Accept: application/json' https://ptpb.pw/ls
- paraiso-light
- manni
- monokai
- igor
- emacs
- bw
- fruity
- murphy
- autumn
- vs
- vim
- tango
- native
- perldoc
- default
- pastie
- borland
- xcode
- trac
- rrt
- colorful
- friendly
- paraiso-dark

/l has the same issue. Both of these are using complex_response(), why are these routes not respecting Accept: application/json?

buhman commented 8 years ago

Heh. They are, but because this is a GET, you get the cached yaml response instead.

buhman commented 8 years ago

Turns out varnish already has behavior for dealing with this by default; fixed in 0e2632575bf788681f6e934fa9b666ae57042fa5

HalosGhost commented 8 years ago

\o/