I'm using the
org.apache.http.HttpResponse class in my Java application, and I need to be able to get the HTTP status code. If I used
.toString() on it, I can see the HTTP status code in there. Is there any other function that I can just get the HTTP status code as either an int or String?
Thanks a bunch!
I'm running into a small problem at the end of the Getting Started guide for
vagrant. I'm working on a CentOS basebox that has Apache2 running (provisioning via Puppet). I've set up port forwarding for web requests using the following line in
config.vm.forward_port "web", 80, 4567
But when I make requests to that port, they fail. The error reported by Safari is 'Safari can’t open the page “http://localhost:4567/” because the server unexpectedly dropped the connection.'
I did a
vagrant reload and saw "[default] -- web: 80 => 4567 (adapter 1)" in the scroll, so where should I begin to troubleshoot this? Thanks.
- I'm building a site that uses web sockets (technically Flash sockets) in order to provide real-time communication.
- I want to be able to support people behind corporate/academic firewalls that block everything except port 80
- I'd like to be able to run the site off of a single machine
Previously, I've been using Apache for HTTP serving combined with some python listening on a high-numbered socket for the websocket stuff, but that obviously won't work here.
I can always move the websocket stuff to a separate server, but I'd like to avoid paying for a second VPS (and have to talk to the database over the network instead of locally). Is there a good way to do this (nodejs, nginx, ..?), or is it not worth the headache?