balderdashy/sails — pull request #2485 by Josebaseba (2014-12-10 19:35:40+00:00)
Title: Return bad request if you are trying to access to /firehose with a http request

Hey guys,

When I was reading the code I've realized that when you try to go to the /firehose url with a http request, you don't get a response and the request gets pending.

hooks/sockets/lib/index.js

```javascript
'get /firehose': function firehose(req, res) {
if (!req.isSocket) {
sails.log.error("Cannot subscribe to firehose over HTTP! Firehose is for socket messages only.");
return;
}
```

You can verify that in the http://sailsjs.org/firehose url.

I've just add a bad request response to avoid that behavior:

```javascript
return res.send(400);
```

Thanks!