exciting-io / printer

Tools for exploring the possibilities of "internet of things" printing.
http://exciting.io/printer
MIT License
481 stars 94 forks source link

Server returns wrong Content-Type response header #42

Closed ghost closed 11 years ago

ghost commented 11 years ago

(bug, however does not affect the funcionality)

HTTP server returns wrong Content-Type response header for data availability check at http://printer.gofreerange.com/printer/{id} URL. In fact it respects request Accept header ("application/vnd.freerange.printer.") and provides correct data. However, server sends wrong response's Content-Type, which is always set to "text/html;charset=utf-8" (should be "application/vnd.freerange.printer." etc.).

> GET /printer/*** HTTP/1.0
> Host: printer.gofreerange.com
> Accept: application/vnd.freerange.printer.A2-bitmap
> X-Printer-Version: 1.0.5

< HTTP/1.0 200 OK
< Date: Thu, 21 Feb 2013 12:39:48 GMT
< Status: 200 OK
< X-Frame-Options: sameorigin
< X-XSS-Protection: 1; mode=block
< Content-Type: text/html;charset=utf-8
< Content-Length: 9172
< Via: 1.0 printer.gofreerange.com
< Vary: Accept-Encoding
< Connection: close
lazyatom commented 11 years ago

Great spot - thanks!